Test the project at topheman-cycle-infos.herokuapp.com
This project was scaffolded with yeoman and its angular-fullstack generator.
There is a minimalist backend written in NodeJS, with express which calls the JCDecaux API to get the availability of their bikes and bike's stands in real time on their self-service bike offer.
The challenge was more in the frontent, to use AngularJS, inside the yeoman workflow, using different techs such as :
- the yeoman / grunt / bower stack
- sass with bootstrap
- google maps API
- build and send to heroku
More on this blog post.
- Sass / Compass
gem install compass
- Grunt - see gruntjs.com/getting-started
npm install grunt-cli -g
npm install bower -g
First, go to developer.jcdecaux.com and get an api key.
npm install(to install all node_modules needed for dev and prod)
bower install(to install the front dependencies)
grunt copy:config(will create the config files in
lib/config/envfrom the template)
lib/config/env/development.js, set your correct apiKey.
grunt serve : Will launch the server with livereload.
To build your site :
Once you've built, to test in real : set your
production (the server based on express needs to know that, also, if you host the solution, you would have to set it on your server).
export NODE_ENV=production(linux / OS X)
To launch your built solution :
node dist/server.js then go to
Make sure to put back
NODE_ENV the way it was ("development" or nothing) when you get back to testing.
Launch to heroku
The yeoman fullstack generator is great. All you have to do (assuming you have already installed the heroku belt), is to :
git push heroku master