Expedia API travel site
Angular JS + Lineman.
- Template Precompilation into Angulars $templateCache using
grunt-angular-templates
- A basic login, logout service bound to sample routes inside
config/server.js
- Configured grunt-ngmin so you don't have to fully qualify angular dependencies.
- Auto generated sourcemaps with inlined sources via grunt-concat-sourcemap (you'll need to enable sourcemaps in Firefox/Chrome to see this)
- Unit Tests and End-to-End Tests
- Configuration to run Protractor for End-to-End Tests
- Restangular AngularJS module as opposed to $http or $resource
- Express / node.js Expedia API consumed via Lineman's server proxy
- Livereload plugin
- Bower plugin
- CoffeeScript
- Bootstrap
- Angular UI Router
- CoffeLint
$ git clone [email protected]:austin-pair-programming/travel.git
$ cd travel
$ sudo npm install -g lineman
$ sudo npm install -g bower
$ npm install
$ bower install
$ export NODE_ENV=development
$ node server/app.js
$ lineman run
- Your browser will open to localhost:8000
$ export NODE_ENV=production | export PORT=80
$ lineman build
- Deploy
server
anddist
folders to external server. $ cd server
$ npm install --production
- Run server/server.js script with forever
#NOTE: Tests are not configured yet for current files. On my TODO list, along with running on Travis CI.
Testing procedures based on @davemo's Testing Strategies for Angular JS screencast, and contains all the tests we wrote in the screencast and a few more!
To run the unit tests:
lineman run
from 1 terminal windowlineman spec
from another terminal window, this will launch Testem and execute specs in Chrome
To run the end-to-end tests:
npm install protractor
brew install selenium-server-standalone
- Make sure you have chrome installed.
lineman run
from 1 terminal windowlineman grunt spec-e2e
from another terminal window
Troubleshooting:
If you see this error: Warning: there's no selenium server jar at the specified location,
you may need to change the selenium-server-standalone jar version in config/spec-e2e.js
to the actual you see in /usr/local/opt/selenium-server-standalone (brew users may have a libexec directory).
If you see this error: Fatal error: The path to the driver executable must be set by the
webdriver.chrome.driver system property, you may need to download the chromedriver
(https://code.google.com/p/selenium/wiki/ChromeDriver) and place it in /usr/local/bin (mac).