12/March/2020
Heroku https://increment-as-server.herokuapp.com/ (backend) https://increment-as-view.herokuapp.com/ (frontend)
6 hours (back) 3 hours (front)
I assumed the counter was generated per user.
There are some repeated code, some functions that could be moved to utility files, some syntax sugars could be applied, removed some lint checks that I would like to solve. Not validating if the email is valid.
- Deploying it to Heroku OK
- Build UI OK
git clone https://github.com/andrefa/increment-as-server.git
yarn
mv .env.template .env #fill with respective configurations
yarn start
Tried to include Google OAuth, haven't found one straghtforward way to (Google developers console has more info/functionalities than I could imagine)
I've built it to be persistent. To accomplish it, I'm using a Postgres database, currently hosted on Heroku. Also I've tried to build one consistent architecture. Added my own dependency injector, manually, to make it easier to test (tests not included).
Hosted on - https://increment-as-server.herokuapp.com/ Source code - https://github.com/andrefa/increment-as-server
POST /auth/login
params
email
password
returns
authentication token
POST /auth/register
params
email
password
returns
authentication token
GET /counter/current
returns
current counter
GET /counter/next
returns
current counter + 1
PUT /counter/current
params
current
returns
current counter
Hosted on - https://increment-as-view.herokuapp.com/ Source code - https://github.com/andrefa/increment-as-view
A good chalenge. I think it would be easier without the authentication part but probably it would be too simple for this assignment.