Last active
October 21, 2015 05:05
-
-
Save aweary/a8a28f73bc4707539dac to your computer and use it in GitHub Desktop.
microbe.js example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import microbe from 'microbe.js' | |
const app = microbe(__dirname) | |
app.route({ | |
path: '/', | |
method: 'GET', | |
handler: duplex => duplex.render('index', {content: 'This is content!'}) | |
}) | |
app.on('start', () => { | |
console.log(`Application started on port ${app.get('port')}`); | |
}) | |
app.start(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment