For ExpressJS site change from sqlite db to Postgresql db with locking rows feature
€8-30 EUR
Closed
Posted over 3 years ago
€8-30 EUR
Paid on delivery
Only apply for this project if you know ExpressJS (including [login to view URL](), express-session, ...), if are familiar with ExpressJS this project will be easy for you.
Tasks:
1. Switch from sqlite to Postgresql
2. Only in route /classify block articles when another user loaded that article already.
User names get assigned with variable user ([login to view URL]://localhost:3000/?user=user1).
Currently I used in /classify an sql query with "done != 1". Please change it so that user1 and user2 don't see the same article when they load the page at the same time. Hence, you need to block that article until that user submits OR after a timeout of 30 minutes. (Maybe one way to achieve that is psql FOR UPDATE and lock_timeout?)
How to start working on this project:
- Please use git (start the project with git init and send me the zip git repo at the end)
- npm install
- npm start
- The db stuff you will find in routes/[login to view URL]