/node-api-project-template

This is a template for a NodeJS API

Primary LanguageTypeScriptMIT LicenseMIT

node-api-project-template

This is a node api project template to see how I work

Node architecture

  • srcs Sources folder
  • dist Folder for generated files
  • tslint.json TSLinter configuration file
  • nodemon.json Nodemon config file to watch project
  • tsconfig.json Typescript config file

Code architecture

I always use the base like this:

Code standard

As a linter I like to use standardjs here I use tslint with standard config

In package.json I often have at least five scripts:

  • start
  • build
  • watch
  • lint
  • test

I prefer to use each CLI on code with npm like that we doesn't need to install global package and CLI in node_modules will be used

Docker

I create a Dockerfile with mutlistage who first build project then run the outputed files in a second stage.

License

MIT