Skip to content

Instantly share code, notes, and snippets.

@gr0uch
Last active August 4, 2016 02:14
Show Gist options
  • Save gr0uch/4d862e787f4c3f5e1f75 to your computer and use it in GitHub Desktop.
Save gr0uch/4d862e787f4c3f5e1f75 to your computer and use it in GitHub Desktop.
import fortune from 'fortune'
import express from 'express'
const store = fortune.create()
const server = express()
store.defineType('user', {})
server.use('/users', (request, response, next) => {
// Do something...
next()
})
server.use(fortune.net.http(store))
store.connect().then(() => server.listen(1337))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment