All of the code for the project is current in the survey-app
folder. This project is built using KeystoneJS. More specifically it uses Node.js, MongoDB, Express, Pug, Stylus and Bootstrap.
brew install mongodb
/data/db
directory with the correct permissions.Clone the repository
git clone https://github.com/will-saunders/BCAT.git
cd BCAT/survey-app
npm install
Create a .env
file with a cookie secret:
echo "COOKIE_SECRET=<a_bunch_of_characters>" > .env
For now, <a_bunch_of_characters>
can be whatever you'd like.
In a separate terminal start mongodb: mongod
Run npm start
Check localhost:3000
Login to the admin page with username: user@keystonejs.com
and password: pass
Debugging should work out of the box with VSCode
BCAT/survey-app
|-- models
|-- public
|-- styles
|-- site
|-- _layout.styl
|-- _variables.styl
|-- routes
|-- index.js
|-- middleware.js
|-- views
|-- templates
|-- views
_layout.styl
and _variables.styl
are the stylus files to override bootstrap defaults.site.css
and site.styl
are generated, so any changes you make to them will be overwrittenroutes/index.js
routes/views/<your_view>.js
locals.varname
, which will be varname
in the pug templatetemplates/views/<your_view>.pug
Keystone Demo
Keystone Demo Repo
Keystone DB Documentation
Throttling Network w/Chrome DevTools