Last active
August 4, 2016 02:14
-
-
Save gr0uch/4d862e787f4c3f5e1f75 to your computer and use it in GitHub Desktop.
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 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