This application includes the basics of an Express app that can be used as a starting point to build many common types of web applications, whether it's a site, an API, or a progressive web app. It also creates a dist/ folder with compiled front-end code ready for distribution either as a static web app or to be turned into a progressive web app (using Electron or some other purpose).
bin/
- a place for scripts. Thewww
file starts the web server and app.js.data/
- the place to put controller functions that fetch data from your models for either your UI routes or your API.routes/
- contains all of your routessrc/
- contains your Pug views, SCSS, and ES6 javascript, which is compiled to a dist/ folderdist/
- contains files compiled fromsrc/
in HTML, CSS, and browser-compatible Javascript. Contains anassets/
folder for images, videos, files, etc.test/
- contains mocha unit test scripts
If your views will not be pre-compiled for distribution, you can delete the code that compiles the HTML and just use src/pug
as your views/
folder.
- install:
npm install
- start:
npm start
- test:
npm test
app.js
- contains the main application codegulpfile.js
- contains all the automated compilation codeserver.sh
- uses node supervisor to run the application so it restarts when changes are made to files not indist/