https://github.com/tomgi/loco-flight-search
https://github.com/tomgi/loco-flight-search
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/tomgi/loco-flight-search
- Owner: tomgi
- Created: 2018-06-27T07:28:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T22:46:00.000Z (almost 8 years ago)
- Last Synced: 2025-01-29T13:46:41.931Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://loco-flight-search.herokuapp.com/
- Size: 159 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/tomgi/loco-flight-search)
# Loco Flight Search
Simple flight search application that uses Locomote API.
Deployed to https://loco-flight-search.herokuapp.com/ (using free dyno, initial load can take some time if dyno went idle after inactivity).
## Getting Started
Install dependencies, precompile assets and run server in `production` environment with:
```
$ ./start.sh
```
Or if you prefer to do it manually step-by-step:
```
$ npm install
$ npm run build
$ NODE_ENV=production npm start
```
### Prerequisites
To run this project you're gonna need
* Node >= 7.6.0 (for native async/await support). \
I strongly recommend using [nvm](https://github.com/creationix/nvm) for installing and managing Node versions.
* NPM >= 5.0.0
* Browser with ES6 support.
### Developing
Use
```
$ npm run dev
```
to have a live reload of both backend and frontend.
In this mode JS sourcemaps are also included which enables in-browser debugging of frontend scripts.
## Running the tests
Run all tests with:
```
$ npm test
```
### Backend
Run with:
```
$ npm run test-backend
```
Backend tests use [Jest](https://facebook.github.io/jest/), [SuperTest](https://github.com/visionmedia/supertest) and [nock](https://github.com/nock/nock).
### Acceptance
Run with:
```
$ npm run test-acceptance
```
Decided to give [cypress](https://www.cypress.io/) a try for end-to-end browser testing.
## Deployment
Application is deployed to Heroku https://loco-flight-search.herokuapp.com/
## Built With
Backend uses [koa](https://koajs.com/) web framework.
Frontend is pretty much VanillaJS, just some common libraries like [jQuery](https://jquery.com/) or [Moment.js](https://momentjs.com/) + [handlebars](https://handlebarsjs.com/) templates for a bit nicer componentization.
[webpack](https://webpack.js.org/) is used to bundle all frontend JS to a single file. \
[babel](https://babeljs.io/) with `es2016` + `es2017` presets is used to be able to use async/await in the frontend code.
## License
This project is licensed under the MIT License.