Skip to content

Instantly share code, notes, and snippets.

@danclien
Forked from aaronlevin/build.sh
Last active August 29, 2015 14:10
Show Gist options
  • Save danclien/c6d12f31f6d3a8a0d377 to your computer and use it in GitHub Desktop.
Save danclien/c6d12f31f6d3a8a0d377 to your computer and use it in GitHub Desktop.
Look at the README.md

You should use the CommonJS version of path. If you want to grab path directly...

git clone https://github.com/pazguille/path from the working directory so it's loaded into ./path. I changed the require statement to point to that location.

#!/bin/bash
browserify main.js -o bundle.js
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="bundle.js"></script>
</body>
</html>
var path = require('./path');
var userRoute = function(id) {
console.log(id);
};
path('/user/:id', userRoute);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment