Getting Started
The instructions for backend setup can be found on this page.
Backend
MongoDB Database Setup
- Install and start MongoDB by following the instructions on their installation site.
Express Server Setup
- Install a stable version of NodeJS. The LTS or current version should work fine.
- Clone this repository, and navigate to it using
cd
in your command line. - Run
yarn install
to install the dependencies. - Copy the
.env.example
file to.env
, and configure the environment variables (more details below). - Run
yarn start
to start the local server atlocalhost:4300
. - Navigate to
localhost:4300/graphql
to interact with the GraphQL Console.
Environment Configuration
MONGODB_URI
: The URL to your MongoDB database. By default, the local development database can be found atmongodb://localhost:27017/your_database_name
(replaceyour_database_name
with the actual name of your database).MONGODB_USERNAME
: The username of your MongoDB account (optional for local development).MONGODB_PASSWORD
: The password to your MongoDB account (optional for local development).CORS_ORIGIN
: The URL of your frontend. Uselocalhost:3000
for local development.SESSION_SECRET
: A randomly generated string for initializing express-session.
Testing
- Please format your code with
yarn format
and run the test suite viayarn test
before pushing and issuing a PR.
Last update: 2021-07-27