mkdir realm-blog
cd realm-blog
npm init
Example of init:
name: (realm-blog)
version: 1.0.0
description: Realm Blog
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
Use Express to handle web requests, Realm or the database, Embeded JavaSxript(EJS) to process its templates, body-parser o parse the queries which are passed from the form.
npm install --save express
npm install --save realm
npm install --save ejs
npm install --save body-parser
The server will restart whenever you modify the code.
npm install -g nodemon
{
"main": "index.js",
"scripts": {
"serve": "nodemon index.js"
},
...
}
npm run serve