A boilerplate project for front-end development with AngularJS, Angular Material, Pug, Gulp, Flask & Tornado.
- Angular Material - Front-end CSS framework
- Stylus - CSS pre-processor
- Pug - HTML pre-processor
- Gulp - Streaming build system
See the nino
folder for more info.
-
Install
nodejs
. -
Install
gulp
by runningnpm install -g gulp
. -
Go to the
frontend
folder and runnpm install
to get all the required node modules. -
Go to the
frontend
folder and rungulp
to compile front-end assets. -
Run
gulp watch
to compile front-end assets and start a livereload server. -
Optional - Install the Pug & Stylus plugins for PyCharm.
- Install nginx and add the configuration file to the conf.d directory:
/etc/nginx/conf.d/nino.conf
. - Create SSL key files for the server (try here) and put them under /etc/ssl/server.key and /etc/ssl/server.crt.
- Change the server name in the nginx configuration file to the real server URL.
- Restart the nginx service.
- Install by running
python setup.py develop
. - Run you project:
- Run
npm install
in thefrontend
folder to get all the node modules. - Run
gulp
in thefrontend
folder to build assets. - Copy the service file to the systemd scripts directory:
/usr/lib/systemd/system/
. - Enable the service so the web server will start automatically after reboot:
systemctl enable nino.service
. - Run the web server by starting the service for the first time:
systemctl start nino.service
. - Make sure no error logs were written by checking the journal:
journalctl -u nino.service
.
- Run
- Profit!