Getting Started
Prerequisites#
- Node.js — check the
.nvmrcfile in the repo for the exact version - MongoDB > 4.0.0 — installation guide
To keep your local Node version in sync with the deployed server, use nvm. It installs the version listed in .nvmrc automatically when you run nvm install.
Verify your installs:
node -v
mongo --versionInstall#
Clone the repository and install dependencies:
git clone https://github.com/cboard-org/cboard-api.git
cd cboard-api
nvm install
npm install -g yarn
yarn installStart the database#
Start MongoDB (process management docs):
mongodConfigure environment variables#
Before starting the API, set up your environment — see Environment Configuration.
Run the API server#
In a separate terminal tab or window:
npm run devThis restarts the server automatically when files change. Alternatively:
npm run startBoth commands start a server listening on port 10010. You can now make calls to the API.
If you run into trouble, double check the prerequisites above are installed correctly.
Next steps#
- Explore the live API with Swagger
- Set up outgoing email
- Run the test suite