Site inspired by La Barbe, a French direct action feminist group that fights gender inequality with sarcastic humour and fake beards.
This site serves as a support and API provider to a chrome web extension. The extension purpose is to highlight companies, events or organizations dominated by men and towards which La Barbe directed its actions.
Both sites and extension are part of a personal exercise independant from La Barbe.
Website url : https://beardy-website.herokuapp.com/ Link to download the extension : https://chrome.google.com/webstore/detail/la-barbe/ajapagjhlmidjgcbcbpfiambnfdaefah
You need to have npm installed
$ npm install express-generator -g
$ express beardy-website --git -c sass
Then install dependencies:
$ cd beardy-website
$ npm install
and init repo
$ git init
$ git add .
$ git commit -m"whatever"
run the app in localhost:3000
with this command:
$ DEBUG=beardy-website:* npm start
To install and save in package.json (-S
= --save
)
npm install -S module_name
Check mongo status
$ service mongod status
When you first store data in the database, such as by creating a collection, MongoDB creates the database. For example, the following creates both the database beardyWebsite
and the collection organizations
during the insert() operation:
$ mongo \\ connect to mongo shell
> show dbs \\ list all dbs
> use beardyWebsite
> db.organizations.insert( { name: "Lyon BD Festival", website_url: "http://www.lyonbd.com/", beardy_date: "Friday, June 14, 2013"} );
> db.organizations.find().pretty()
> db.organizations.remove() // removes one document
> db.organizations.drop() // removes entire collection
Add file Procfile, containing web: npm start
Add heroku support
$ heroku create beardy-website
and push
$ git push heroku master
Ensure that at least one instance of the app is running:
$ heroku ps:scale web=1
Now visit the app at the URL generated by its app name. As a handy shortcut, you can open the website as follows:
$ heroku open
to view logs
heroku logs --tail
You can check how many dynos are running using the ps command: $ heroku ps
You can also run your app locally via $ heroku local web
To start a console : $ heroku run node
To connect to heroku server : $ heroku run bash
To exit bash : $ exit
Config vars :
heroku local will automatically set up the environment based on the contents of the .env file in your local directory. Create a .env file that has the following contents: TIMES=2
To set the config var on Heroku, execute the following:
$ heroku config:set TIMES=2
View the config vars that are set using heroku config:
$ heroku config
- http://zellwk.com/blog/crud-express-and-mongodb-2
- http://code.tutsplus.com/tutorials/build-a-complete-mvc-website-with-expressjs--net-34168
- http://blog.modulus.io/build-your-first-http-server-in-nodejs
- http://cwbuecheler.com/web/tutorials/2014/restful-web-app-node-express-mongodb/
- https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4
- https://erichonorez.wordpress.com/2013/02/10/how-create-a-rest-api-with-node-js-and-express/
- https://thomasbandt.com/hosting-nodejs-and-mongodb
- http://www.hostingadvice.com/blog/where-to-find-free-node-js-hosting/
- https://scotch.io/tutorials/use-mongodb-with-a-node-application-on-heroku
- http://givemethechills.com/how-to-migrate-a-node-js-app-from-heroku-to-openshift/
- http://blog.mongolab.com/2015/02/fully-managed-dedicated-mongodb-plans-on-heroku/
- https://codyhouse.co/demo/squeezebox-portfolio-template/index.html#0
- http://www.rich-harris.co.uk/ramjet/
- https://codyhouse.co/gem/animated-page-transition-2/
- http://tympanus.net/Development/AnimatedGridLayout/index2.html
- http://tympanus.net/Development/BookPreview/
- serialize api data
- find url helper
- form to add data
- basic authentication