/learning-nodejs

This is an example application for Node.js.

Primary LanguageJavaScript

learning-nodejs Build Status Tests Status

This is an example application for Node.js.

Requirements

Installation

Development

Follow the steps below to build and start the NodeJS server.

Generate environment variables and application key.

cp .env.example .env
npm run generate-key

Build Docker image and start Docker container.

make build
make start

Migrate database schema.

npm run migrate

Populate database with seeded data.

npm run seed

Commands

npm start                     # Start NodeJS server
npm run generate-key          # Generate App Key
npm run lint                  # Run linter
npm run lint-fix              # Run linter and fix formatting
npm run test                  # Run tests with Jest
npm run migrate               # Migrate database schema
npm run migrate-fresh         # Drop database schema then rebuild
npm run seed                  # Populate database with seeded data