SITE4SEFO Case Distribution Server
- Run "npm install" from the project root folder.
- Copy and configure: 'default.json.template' as 'default.json'.
- Copy and configure: 'production.json.template' as 'production.json'.
- Run "node src/index.js" to start server.
- Run the unit tests from another terminal "npm test"
$ sudo su postgres $ createdb case_dist_server $ psql case_dist_server $ CREATE USER case_dist_server_user WITH PASSWORD 'test'; $ GRANT ALL PRIVILEGES ON DATABASE "case_dist_server" to case_dist_server_user; $ \q $ exit
$ psql -d case_dist_server -U case_dist_server_user -W $ \q
$ psql -U someuser -h 127.0.0.1 database
$ sudo su postgres $ psql case_dist_server < database_seeds/postgres/seed.sql
$ curl -H 'Content-Type: application/json' -X POST -d '[{"case_name":"Hacker"}, {"case_name":"DDOS"}]' http://localhost:9911/dist/10.11.11.171
$ curl http://localhost:9911/dist/10.11.11.171
$ curl -X "DELETE" http://localhost:9911/dist/10.11.11.171