Open leadermontanus opened 9 years ago
Steg
Se https://docs.google.com/document/d/1KYRbs7JwZOmmqBqkNN02HSKqgbXQd73zCZamYpR-x6Q/edit#
Need to create a matching component (which can be added to templates) that has a single "seconds between checks" config, and a timer that starts when app is loaded.
First time it runs on device it will use HTML5 data api to store what time of day to check, this is a random time, this avoid everyone checking at 12:00... It will also check the first time it is opened.
This will call a simple, non password protected function to determine if it should delete itself.
Commands used to set up Nodejs tools
from: http://docs.sequelizejs.com/en/1.7.0/articles/express/
npm init
npm --save install express express-generator
node_modules/.bin/express . -f
npm install
./bin/www
(Last command starts app, using npm start results in 304s, not sure if OK) Check http://localhost:3000/
Then add db stuff this from http://docs.sequelizejs.com/en/v3/docs/getting-started/, https://github.com/sequelize/cli, https://github.com/sequelize/express-example, http://docs.sequelizejs.com/en/1.7.0/articles/express/, https://github.com/sequelize/sequelize and http://lorenstewart.me/2016/10/03/sequelize-crud-101/
npm install --save sequelize sequelize-cli mysql
node_modules/.bin/sequelize init
Prepare promise stuff (https://expressjs.com/en/advanced/best-practice-performance.html#use-promises, http://stackoverflow.com/questions/35034506/how-to-use-promise-with-express-in-node-js, http://bluebirdjs.com/docs/getting-started.html, http://cryto.net/~joepie91/blog/2015/05/14/using-promises-bluebird-with-express/ and https://strongloop.com/strongblog/async-error-handling-expressjs-es7-promises-generators/
npm install --save bluebird express-promise-router
Now authentication (https://code.tutsplus.com/tutorials/using-passport-with-sequelize-and-mysql--cms-27537, https://www.npmjs.com/package/dotenv and http://passportjs.org):
npm install --save passport passport-local body-parser express-session bcrypt-nodejs express-handlebars dotenv
And finally HTTPS: http://www.hacksparrow.com/express-js-https-server-client-example.html and http://www.hacksparrow.com/node-js-https-ssl-certificate.html ``
For raw SQL queries see: http://docs.sequelizejs.com/en/latest/docs/raw-queries/