Deployment
June 12, 2022 ยท View on GitHub
nexus-api
Self-hosteable social network
Nexus formal definition: a relationship or connection between people or things. Source.
Deployment
This application is published to a Heroku Dyno instance using the
emk/heroku-buildpack-rust on every push to main throught this action.
Development
Requirements
Getting Started
- Clone this repository
git clone https://github.com/whizzbit/nexus-api.git
- Create a copy of
.env.samplein a new file with the name:.env
cp ./.env.sample ./.env
- Execute Docker containers:
docker compose up
-
Run database migrations running
sqlx migrate run. You must complete SQLx Setup First. -
Open a new terminal session and run the server
cargo run
Setup SQLx for Database Migrations
Install SQLx CLI using cargo install for PostgreSQL only
cargo install sqlx-cli --no-default-features --features native-tls,postgres
GraphQL
The API exposed is build using async-graphql, which is a GraphQL implementation build for Rust.
Visit the playground on http://host:port/graphql, when running the project locally.
This GraphQL implementation uses the Cursors Connections Pattern.
The DateTime scalar
Our GraphQL gateway implements the DateTime scalar to specify date values.
You can read more on this scalar here: DateTime.
Contributing
Every kind of contribution to this project is welcome, please, don't hesitate to open a Pull Request or Issue. I will be happy to help!