Skip to content

sumelio/AlMundoApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlMundoApp

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│ │   │          ││
│  │ └───────────┘ │                    │ └───────────┘ │   └──────────┘│
│  └───────────────┘                    └───────────────┘               │
└───────────────────────────────────────────────────────────────────────┘

BackEnd

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

How to launch this web service:

Installation requirements

  • NodeJS v8.11.1 or later.
  • npm.
  • mongoDB.
  1. Enter to AlMundoRestAPI folder and execute this command:
/AlMundoRestAPI
  1. Install modules:
$ npm install
  1. Development express server:

Linux

$ export PORT_NODE_SERVER=3000 && npm start

Windows

$ set PORT_NODE_SERVER=3000 && npm start

NOTA: Navigate to http://localhost:3000/

Show detail of AlMundoRestAPI (BackEnd)

Frontend

This web application shows the hotel list:

Mobile Desktop
https://github.com/sumelio/AlMundoApp/blob/master/resources/mobile.png https://github.com/sumelio/AlMundoApp/blob/master/resources/webPage.png

How to luanch this app

Installation requirements

  • NodeJS v8 or later
  • npm.
  • Angular CLI
  1. Enter to AlMundoWeb folder and execute this command:
/AlMundoWeb
  1. Install modules:
$ npm install
  1. Development server:
$ npm start --port 4200

NOTA: Navigate to http://localhost:4200/

Show detail of AlMaundoWeb (FrontEnd)

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published