This is an application built with Node, Express and PostgreSQL.
- Clone the repo
- Install dependencies:
$ npm install
- Start your Postgres server and create a database called
vdm_db
- Create the database tables:
$ node lib/database
- Start the server:
$ npm start
- Install PhantomJS.
$ npm install -g phantomjs
or$ brew install phantomjs
- We will first need to run server:
$ npm start
- Get the last 200 posts, run in another terminal
$ phantomjs lib/getLastVDM.js
- Get the last 200 VDMs via
api/posts
- Or search by:
- Author
?author=Anonyme
- Date from
?from=YYYY-MM-DD
- Date to
?to=YYYY-MM-DD
- Author
- Get one VDM by id via
api/posts/:id
- Create a new database called
vdm_db_test
- Create the database tables:
$ node lib/database --test
- We will first need to run server:
$ npm start -- --test
- Run in another terminal
$ npm test
Edit the file config.js
and set your own connection informations
- Don't get and store IDs VDM posts : relaunch getLastVDM script add same posts.
- POST last 200 VDMs on API instead of saving in database directly from getLastVDM script, because of PhantomJS uses.