Skip to content

leeallen337/node-starter

Repository files navigation

Node App Boilerplate

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.

Dependencies

  • Node 12.16 (This project has an .nvmrc so you can run nvm use)
  • PostgreSQL

Set Up

  1. Clone the repo
  2. Run rm -rf .git/ and git init
  3. npm install
  4. Set up your local Postgres database. One will be needed for development and for testing
  5. Copy the .env.example file to create an .env file (e.g. cp .env.example .env)
  6. Add the new Postgres database connection strings to the .env file
  7. Run npm run start or npm run test
  8. You're good to go!

Running The Server

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

Linting is set up with ESLint to help maintain code quality. To lint, run:

npm run lint

Automatic Code Formatting

Automatic Code Formatting is set up with Prettier using a pre-commit hook.

Testing

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

Existing Code

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.

Additional Links

About

A simple boilerplate node app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published