BUILDING WEBSITE - PositiveTourism is a website that aims to promote positive tourism. It puts in contact, direct and free of charge, travellers and positive tours organisers.
- Front-End: Angular 7 - https://github.com/LauraDev/PositiveTourism
- Back-End: API Platform - https://github.com/LauraDev/PositiveTourism_api
- CSS Framework: Foundation
- Node: 8.12.0
- npm: 6.9.0
To install: https://nodejs.org/
- Angular CLI: 7.3.5
npm install -g @angular/cli
cd <folder where to download the project>
git clone https://github.com/LauraDev/PositiveTourism.git
npm install
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
This web application has 2 main modules:
-
Showcase : Contains the static part of the web app
- home
- about
- 404
- privacy policy
-
Tour : Contains the part related to the tours
- list all tours
- display the detail of a tour
The /core directory contains the global services.
The /ui directory contains all the components / directives / pipes that are not specific to the main modules and can be reused.
The showcase part is static.
The tour part displays data comming from a REST API ( https://github.com/LauraDev/PositiveTourism_api)
- Services
- TourService : collects tours data
- ContactService : manipulates data coming from the contact form before sending it to the backend service
All POST and GET requests are emitted from this service. The request URL depends on the environment (dev - prod)
Once data are collected from the API, it is stored locally. Next time the tour list or tour detail page is called, only the tours that where created / modified since the last connection are collected.
docker build -t positivetourism .
docker run -p 8050:80 positivetourism
The dockerized app will be accessible at http://localhost:8050