The API server for the Crime Watch web application build using Express/TSNode.
> pwd
~/Crime-Watch/src/Crimewatch-Backend
-
Create a file
.env
.Crimewatch-Backend$ touch .env
-
Set the following.
MONGO_URL = mongodb://localhost/IMS
MONGO_URL_TEST = mongodb://localhost/IMSTEST
MONGO_URL_PROD = mongodb://localhost/IMS
SERVER_PORT = 8080
SERVER_HOST = localhost
In Windows use the the IP address instead of "localhost" in the connection string.
mongodb://127.0.0.1/IMS
Run npm test
to run the unit testing for the services.
Run npm start
to srat the API server. Navigate to http://localhost:8080/
. If the frontend has already been built, it will be servered as well