Developer Notes - ThePix/rpg_web GitHub Wiki
To create the software, this is the procedure I used.
First install Express, which gives a basic web server. After that: nodemon (for development, it reloads when files are changed), serve-favicon (for the favicon), and express-generator (to create the files):
npm install express --save
npm install -g nodemon
npm install serve-favicon
npm install express-generator -g
npm init
I also installed AVA for testing (and in `ava\lib\concordance-options.js' replaced blue with cyan, so I could read the output).
The next few steps create the framework (using pug as a templating engine), and set stuff up.
express --view==pug rpg
cd rpg
npm install
npm audit fix
Files
Express has three types of files that contain content.
The files in the "routes" are used when an HTML request comes in, and between them decide how it will be handled. The master file for that is "\app.js". In the MVC model, this is the controller.
The files in models each define a class. The models of the MVC model.
The files in views are the PUG files that template the HTML files, the views in the MVC model.