dronesym-node
foldernpm install
to pull the dependenciesexception in initAndListen: NonExistentPath: Data directory C:\data\db\ not found., terminating"(Windows) or "Error: dbpath (/data/db) doesn't exist"(Linux)
, create the dbpath as follows before running mongodb with replica set.$ sudo mkdir -p /data/db
As the owner and the group of '/data' directory are root, we need to change ownership of the directory to the current user to access it.
We can change the ownership of the directory as follows:
$ sudo chown -R username:group/data
$ sudo chmod 0755 /data/db
If one wants to change the MongoDB default data path i.e. "C:\data\db" (Windows) or "/data/db" (Linux) to some other directory then use:
mongod --dbpath new_dbpath
where new_dbpath is the path of the new data store directory. Ex : new_dbpath = /usr/local/var/mongodb-data
mongod --replSet rs
to start running Mongo with a Replica Set.mongorestore --db dronesym dronedb/dronesym
npm start
to start the Node server
Note: Make sure you have an admin account in the database under user collection. (Refer the schema in Models folder)sudo pip install -r requirements.txt
to pull the dependenciesdronsym-python/flask-api/src
folderpython main.py
to start the Flask server
Note: Node server should be running when starting up the Flask serverMake sure that you have Node6.x or higher version installed
Install AngularCLI
$ npm install -g @angular/cli
Set environmental variable in ./dronesym-frontend/src/environments/environment.ts
Note: You will have to rename the example.environment.ts
to environment.ts
or create new file, for example by copying the example file:
$ cp src/environments/example.environment.ts src/environments/environment.ts`
Edit the environment.ts as follows
mapsApiKey: 'YOUR_GOOGLE_MAPS_API_KEY',
nodeApiURL: 'http://localhost:3000/dronesym/api/node',
feedURL: 'http://localhost:3000/feed'
Note: Dronesym Node server (./dronesym-node/
) and DroneSym Flask server (./dronesym-python/flask-api/src
) should be running before starting the frontend server_
Note: You should enable Google Maps JavaScript API before using API key
Starting the Angular development server
$ npm install
$ ng serve
1.Navigate to dronesym-node
folder and run npm install http
2.Then run yarn test
username: admin
password: admin
username: icarus
password: icarus
Checkout to docker branch
$ git checkout docker
Navigate to the root folder
Run
$ docker-compose up
For node unit tests - both the flask server and node server have to be running.
Navigate to dronesym-node
Run npm test