This is a tech test for Financial Times. I will build a website that asks for and stores a simple rating score for using ft.com. This website will be will hosted on Heroku .
As a user
So that I can share my experience of using ft.com
I'd like to rate the website
As a user
So that I can see the popularity of ft.com
I'd like to see all the ratings
- Build a website
- Store the Rating
- Host on cloud
- Diagram of the site architecture
- Templated infrastructure as code
- Automated testing
- Origami Components/FT look and feel
- The ability to view ratings/results
Local development of this FT rating web application assumes the following are already installed:
- PostgreSQL database
- npm and node
After you have cloned the repository, please run the below steps:
createdb ft_dev
createdb ft_test
export PG_USER=$(whoami)
export PG_PASSWORD=your_password
export NODE_ENV=development
knex migrate:latest --env development
knex migrate:latest --env test
npm test
to run testsnode_modules/nodemon/bin/nodemon.js --exec npm start
to run the server
Please run the following commands in bash:
heroku create your-app
heroku addons:create heroku-postgresql:hobby-dev
git push heroku master
heroku run knex migrate:latest --env production
- Node JS
- Express Web App Framework
- Knex Postgres Query Builder
- Mocha, Chai & Chai-HTTP for testing
- Nodemon for auto-reload
- Istanbul Code Coverage via nyc
If I had more time, I would have looked into implementing the below:
- Currently my devlopment setup assumes the presence of user
reena
and databaseft_dev
. It would be good to have these configurable (via environment variables?) so that anyone can clone and run the tests/play around with the setup. - End to end Browser UI testing (across browser versions/variantions) using Nightwatchjs
- Beautifying the application UI