For development, you will only need Node.js, a node global package, npm and MySQL installed in your development environment.
-
Just go on official Node.js website and download the installer. Also, be sure to have
git
available in your PATH,npm
might need it (You can find git here). -
You can install nodejs and npm easily with apt install, just run the following commands.
$ sudo apt install nodejs $ sudo apt install npm
-
You can install nodejs and npm easily with brew install, just run the following commands.
$ brew install node
-
Visit MySQL official documentation for installation guide.
$ git clone https://github.com/Hybeecodes/drone-api.git
$ cd drone-api
-
Create a
.env
file -
Copy the contents of
.env.sample
into the.env
file -
You can replace the database credentials if necessary
-
Create the database on your local MySQL instance
-
Run the
setup.sh
file in the project root.
If you got a permission error, please runchmod +x setup.sh
to change permission, then try again.
Thesetup.sh
file does the following:- Installs project Dependencies
- Runs the Project Build
- Runs the Database Migration
- Seeds Demo Data into the database
- No Authentication is required (Although, in a real world scenario, authentication would be required [JWT, OAuth, etc])
- Medications are being stored in the database at the point of loading a drone
- Run
npm start
to start the app (app runs on PORT 8081 by default). - Run
npm test
to run test. - Published Postman Collection URL
The Assessment was a very good one.