- Install Node.js 6.x (or higher)
- Python version 2.7
- After cloning the repo navigate to
dronesym-node
folder - Run
npm install
to pull the dependencies - Create a Firebase Admin sdk private key following the instructions in the Generating Firebase Key File and Database URL section below
- In
example.db.js
file provide the path to your firebase key file and the database url - Run
mongod
to start running Mongo - Open another terminal without disturbing the terminal running mongod, then import the database with
mongorestore --db dronesym dronedb/dronesym
- Run
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)
- After cloning the repo, navigate to the folder dronesym-python
- Run
sudo pip install -r requirements.txt
to pull the dependencies - Navigate to
dronsym-python/flask-api/src
folder - Run
python main.py
to start the Flask server Note: Node server should be running when starting up the Flask server
Make 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`
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_
Starting the Angular2 development server
$ npm install
$ ng serve
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
- Sign into your google account and go to the Firebase Console page.
- Add your project on then go to the settings panel for user credentials.
- Generate and Download a new private key and move it to the same directory as the example.db.js file.
- Open example.db.js and paste the name of the downloaded file into the creds = require line, as shown. Also, copy the database URL (looks like https://<database_name>.firebaseio.com) from the console and paste it in the databaseURL line, as shown.