Test-build for pre-alpha demo. Here are the steps to test if web server and database can communicate from web browser.
$ npm install
Create/start pgsl server at:
postgres://localhost:5432/cs2102
Run this script and all tables should be created in the database
npm run droptables
npm run maketables
npm run fixtures
app.js
is the entry point. To start server, run:
$ nodemon app.js
Send a POST request with data { text: "testing 123" }
You can do that via the command below, or any other methods (i.e. Postman, etc).
$ curl --data "text=testing123" http://127.0.0.1:5000/db/insertItem
You should be able to view data through this URL: