a2aa9ed Sep 19, 2013
76 lines (49 sloc) 2.76 KB


  • checking in bundle.js to allow running this in github pages
  • removing hyperwatch
  • removing line numbers from rendered code
  • minor fixes to make the app work statically


  • replacing textarea with brace editor and adjusting styles


  • editing index.css and adding npm start script in package.json


  • updating rendered markdown when user edits textarea (init.js lines: 13-21)
  • removed require('fs') workaround that had been there due to a bug in browser-builtins -- not important


  • removing {MARKDOWN} placeholder and simply serving index.html as-is server side
  • adding init.js which uses fs.readFileSync to load the on the client side
  • installing brfs and adding the transform to inline text
  • it then inserts the rendered markdown into the div.render and the original text into textarea.edit
  • render-md.js didn't have to change at all to move the render step client side!

  • installing hyperwatch to get serverside message feedback in the browser

  • initializing hyperwatch client side (main.js lines: 5) and server side (index.js lines: 46)

  • removed test code from render-md.js


  • installed local browserify
  • added a build.js script that can be run via node build to see resulting bundle piped to stdout
  • interesting to note that .bundle() returns a stream
  • serving bundle now by calling build and piping the resulting stream into the response index.js lines: 33-=35
  • added textarea in index.html for next step


  • added css/index.css which contains styling for the generated markdown
  • added a route for it in index.js to serve it via createReadStream lines: 37-40


  • updated readme
  • installed peacock and marked and added render-md.js which takes a markdown string and returns rendered html
  • inserted a {MARKDOWN} placeholder in index.html
  • updated the server (index.js) to render our and replace {MARKDOWN} with the resulting html before serving our index.html lines: 13-30
  • we now launch our app via: node index.js


  • created simple http server (index.js) that serves index.html and bundle.js
  • interesting to note that both are piped from createReadStream lines: 7-15


Good place to start following the steps

  • removed scripts from package.json
  • index.html file that references bundle.js that needs to get genereated from main.js via: browserify main.js > bundle.js


-cleaned up package.json


  • ran nstart script to generate repo