An open-sourced backend for Volume, a news aggregator for Cornell's publications and magazines. Made by Cornell AppDev.
Tech stack:
- Typescript/Node.js
- MongoDB
- GraphQL
To run this project, you must have Node.js and Typescript installed on your machine.
Clone the project with
git clone https://github.com/cuappdev/volume-backend.git
After cloning the project cd into the new directory run
git config core.hooksPath .github/hooks
and install dependencies with
npm install
We use direnv to keep track of environment variables. Install direnv to your machine.
In order to allow direnv to load environment variables, it needs to be able to hook into your shell. If using ZSH, for example, you should add the following line to the end of your ~/.zshrc file:
eval "$(direnv hook zsh)"
You can find the full list of direnv hook commands here
Then, to start the project, run the following terminal commands
direnv allow
npm run start
Make sure MongoDB is installed. See installation guide.
To run MongoDB on a MacOS device, run
brew services start mongodb-community@6.0 (6.0 may be outdated, check website for updated version).
and connect MongoSH to a running instance using
mongosh
From here, you can interact with your database by typing use <db_name>.
If you are using VSCode, we recommend installing the MongoDB extension to allow you to interact with documents in your database straight through the editor. More information on this here.
We recommend using direnv. To set up, run the following:
cp .envrctemplate .envrc
We recommend using ESLint and Prettier for linting/formatting. If you are using VSCode, they can be downloaded directly through the Extensions panel. Run ESLint on the codebase with npm run lint and Prettier with npm run format.