An application capable of operating (n) Drones to deliver lunch to different addresses in the city of Bogotá. this project is found based on the Delivery service with Drones. Furthermore aims to be designed for small business. For example, in this case, the restaurant "Su corrientazo" planing delivery 3 lunch each route and the manager program these routes in one text file. An example of the text(in.txt) file that enters the system for one-day delivery would: AAAADAAA IADAD AAIADAD Where: ● Letter A corresponds to a forward movement. ● Letter I corresponds to a 90-degree turn of the drone to the left. ● The letter D corresponds to a 90-degree turn of the drone to the right.
Each line of the text file corresponds to a lunch delivery. ● The drone always starts at the (0, 0) north orientation of the drone to the right. This solution was solved with As dynamically typed languages became prominent during the last decade, typeless programming became the norm for the backend as well as the frontend.NodeJS with to HTTP req Get and Get(id)
You can read more documentation in docs/index.html
Dependencies for the NodeJS Typescript Sample App NestJS to bootstrap the server Swagger to define the server docs Okta for user management and authentication NodeJS validate-class npm library for input validation nodemon to auto-restart the server on every change
-
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).
If you need to update npm
, you can make it using npm
! Cool right? After running the following command, just open again the command line and be happy.
$ npm install npm -g
After installing node, this project will need yarn too, so just run the following command.
$ npm install -g yarn
$ git clone https://https://github.com/jhoncbernal/Delivery (
$ cd Delivery
$ yarn install
You will need to install the dependencies this is the command:
npm install @nestjs/[email protected] @nestjs/[email protected] @nestjs/[email protected] @nestjs/[email protected] @okta/[email protected] @okta/[email protected] @types/[email protected] @types/[email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] @types/[email protected]
npx nodemon server.js --ext ts
After running the server, direct your browser to https://localhost:3000. An API console should open with the message “No operations defined in spec”.
with /dron-posts let's start of route with one drone with 3 lunch that read the file text in.txt and its output is out.text
Likewise, the result of each of the drones must remain in the archives of different text like this: out01.txt, out02.txt, out03.txt, ..., out20.txt where out01.txt corresponds to the report of drone 01, out02.txt corresponds to the report of drone 02 and so on.
Likewise, S4N has been notified that drones are now able to deliver Up to 10 lunches per route.
with /dron-posts/{id} the parametre id sends the number of drones to get start the route this drones read the files in01.txt, in02.txt, in03.txt, ... , in20.txt (number max is 20)