Skip to content

A simple setup to do client-side development with node.js, express and browserify

Notifications You must be signed in to change notification settings

saskjavascript/client-side-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Client-Side Node.JS

This was a simple coding dojo project setup for Sask JavaScript to show how easy it is to manage dependencies using node modules, and setup a simple dev environment with node.

Notes

This is the final stage of the project, we will be going through each of the steps as a code-along dojo at the meetup.

Dependencies

  1. node.js
  2. npm
  3. Various Dependencies listed in package.json

Dojo Steps

Steps:

  1. npm init
  2. view package.json
  3. set private true, explain why
  4. install express with npm
  5. setup an express simple app.js
  6. create an index.html
  7. what is our app going to do?
  8. consume some photos via the flickr api?
  9. go create a flickr account, or login to yours and create an "app"
  10. get a non-commercial api key and secret
  11. npm install request
  12. require the request library, which we'll use to make external requests
  13. setup a proxy to the flickr api to get some pictures back
  14. restart, and see if it works! (note on addons to view json in browser)
  15. kind of annoying having to restart the dev server every time, so let's solve that with node-dev
  16. npm install node-dev --save-dev
  17. setup a script, npm run-script devserver
  18. client-side stuff: let's create a little set of modules to deal with the photos
  19. installing and requiring jquery from within node, to use client-side
  20. configuring express to use browserify and setup a bundle
  21. add the bundle to your index.html
  22. winner :)
  23. photo.searcher
  24. photo.viewer
  25. installing underscore and configuring it for the template function
  26. noticing that our clientside code isn't being refreshed, because the server needs to restart in order for browserify to rebuild our bundle
  27. install wach, setup a dev script to do that.
  28. get things running in our app
  29. creating a standalone bundle with browserify
  30. minify with uglify
  31. setup a script to auto minify for us

License / Usage

This code is made available free of charge. Do what you want with it :)

About

A simple setup to do client-side development with node.js, express and browserify

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published