Simple node.js projects boilerplate. No Express or any other framework. Only plain node.js with third party libs.
Simple server side Node.js application (for example API provider with simple Web UI) — is the best usage case of the boilerplate.
app/node_modules folder for Node’s dependencies resolution algorithm/app — server side application code folder/app/node_modules - place your server modules here/public — client side html/jpeg/css files and javascript code for your “serverless” application/install — database initialization scripts and other files for server app deployment/bin — server side application start/stop scripts and similar helpers/node_modules — place for third party libs. Will reveille itself after npm install commadn execution. You do NOT want to place it under git control :)git clone https://github.com/app/node.frameworkless.boilerplate.git my-best-app
cd my-best-app
npm i
Start you server app with
npm run dev
Start you static client app with
npm run web
npm run build
will create minified and bundled static app in dist/ direcrory.
You have to copy dist/ where nginx root indicates.
For server application you have to setup systemd service with this example
Some text editors and IDE’s have a feature called safe write that basically prevents data loss, by taking a copy of the file and renaming it when saved.
This feature blocks the automatic detection of file updates. To disable safe write use the options provided below: