Server for EcoPolice app
node index.js
or
npm i pm2 -g
pm2 start index.js --watch --ignore-watch 'public/*'
GET /all
- returns all the disastersGET /one/<id>
- returns certaint disaster by idPOST /upload
- uploads photos of disasterPOST /add
- adds new disaster
create table main
(
id int auto_increment,
disasterName text not null,
disasterDescription text null,
disasterDate bigint null,
lat float null,
`long` float null,
objectName text null,
owner text null,
cause text null,
product text null,
volume int null,
area int null,
damageCount int null,
damagedObjects text null,
images text null,
constraint main_id_uindex
unique (id)
);
alter table main
add primary key (id);