This is a simple node app that can be used as boilerplate to kick off a project. It comes with several built in packages that you might need along with a lot of things already "set up" which will be explained below.
- Node 12.16 (This project has an
.nvmrc
so you can runnvm use
) - PostgreSQL
- Clone the repo
- Run
rm -rf .git/
andgit init
npm install
- Set up your local Postgres database. One will be needed for development and for testing
- Copy the
.env.example
file to create an.env
file (e.g.cp .env.example .env
) - Add the new Postgres database connection strings to the
.env
file - Run
npm run start
ornpm run test
- You're good to go!
To run the server in development mode locally, run:
npm run start
To run the server in debug mode (open Chrome
and go to chrome://inspect
and
click Open dedicated DevTools for Node
), run:
npm run start:debug
Linting is set up with ESLint to help maintain code quality. To lint, run:
npm run lint
Automatic Code Formatting is set up with Prettier using a pre-commit hook.
Testing is set up with the following technologies:
and the following add ons:
To run the tests, run:
npm run test
Tests can also be run in debug mode by running:
npm run test:debug
There are already some exisiting initial files to get started with (or to replace). There are some files for controllers, routes, models, migrations, and tests.
These are all set up to run propertly and all the tests pass. If the current set up does not meet your needs these are just some boilerplate files to get you started.