Skip to content

Template for monorepo application using NodeJS & browser

Notifications You must be signed in to change notification settings

soryy708/nodejs-app-quick-start

Repository files navigation

Use this as a template for your repository!

Do with this template anything you wish - license is MIT License.

Features:

  • DevOps scripts via gulp and batch
  • Tests via mocha & supertest
  • Plays a sound when a test fails
  • API is integrated with relational (SQL) database via Sequelize ORM
  • Authentication is already done
  • API can be packaged in to a standalone executable via pkg
  • Logs errors in to database
  • Write front-end styles with style via Sass (Scss), comes pre-configured
  • Pre-configured linter
  • Monorepo structure

Prerequisites

  • NodeJS LTS
  • ESLint extension for VSCode
  • Don't forget to npm install

How to build / run

Many tasks are automated via scripts, using npm, gulp, & batch scripts. Such scripts reside in package.json and in the scripts directory.

  • Building
    • Build everything: npm run build
    • Build just front / api: npm run build-front or npm run build-api respectively
    • Build & rebuild if changes detected: npm run autobuild-front or npm run autobuild-api
  • Running
    • Run everything: npm start
    • Run just front / api: npm run start-front / npm run start-api respectively
    • Run all tests: npm test
    • Run just front / api tests: npm run test-front / npm run test-api respectively
    • Run & rerun tests if changes detected: npm run autotest-front or npm run autotest-api
  • Packaging
    • Package back-end: npm run package-api
  • For a simple, one-action set up for development, run start-dev.bat in the root directory. This builds everything & rebuilds if changes are detected, runs everything, and opens VSCode.

Conventions

Tests

  • All tests are in their own files, ending with .test.js

About

Template for monorepo application using NodeJS & browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages