This application has two parts:
- FrontEnd: A web application with Angular 5 called AlMundoWeb.
- BackEnd: A Rest API service with NodeJS called AlMundoRestAPI.
Diagram:
┌───────────────────────────────────────────────────────────────────────┐
│ AlMundoApp │
│ │
│ ┌───────────────┐ ┌───────────────┐ │
│ │ AlMundoWeb │ │ AlMundoRestAPI│ │
│ │ (FrontEnd) │ │ (BackEnd) │ │
│ │ ┌───────────┐ │ Resquest Hotels │ ┌───────────┐ │ ┌──────────┐│
│ │ │Angular 5 │ │ ───────────────> │ │ NodeJS │ │ │ ││
│ │ │ bootstrap │ │ │ │ Express │ │===│ MongoDB ││
│ │ │ karma │ │ Response JSON │ │ Mongoose │ │ │ ││
│ │ │ │ │ <─────────────── │ │ Supertest│ │ │ ││
│ │ └───────────┘ │ │ └───────────┘ │ └──────────┘│
│ └───────────────┘ └───────────────┘ │
└───────────────────────────────────────────────────────────────────────┘
This Rest API has four methods:
| Method | url | Description |
|---|---|---|
| GET | /almundo/hotel?name=[name]&stars=[stars] | Get hotels by name: Hotel name, stars: star numbers |
| POST | /almundo/hotel | Create a hotel |
| PATH | /almundo/hotel | Update a hotel |
| DELETE | /almundo/hotel | Remove a hotel |
- NodeJS v8.11.1 or later.
- npm.
- mongoDB.
- Enter to AlMundoRestAPI folder and execute this command:
/AlMundoRestAPI- Install modules:
$ npm install- Development express server:
Linux
$ export PORT_NODE_SERVER=3000 && npm startWindows
$ set PORT_NODE_SERVER=3000 && npm startNOTA: Navigate to http://localhost:3000/
Show detail of AlMundoRestAPI (BackEnd)
This web application shows the hotel list:
| Mobile | Desktop |
|---|---|
![]() |
![]() |
- NodeJS v8 or later
- npm.
- Angular CLI
- Enter to AlMundoWeb folder and execute this command:
/AlMundoWeb- Install modules:
$ npm install- Development server:
$ npm start --port 4200NOTA: Navigate to http://localhost:4200/

