-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docs, css tweak, add test instance demo
- Loading branch information
0x8890
committed
Sep 14, 2016
1 parent
ae4d89c
commit cd8aae4
Showing
3 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict' | ||
|
||
const http = require('http') | ||
const util = require('util') | ||
const chalk = require('chalk') | ||
const instance = require('./integration/test_instance') | ||
const fortune = require('../lib') | ||
|
||
const port = 1337 | ||
|
||
instance().then(store => { | ||
store.options.settings.name = 'Foobar' | ||
store.options.settings.description = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eleifend tempor vulputate. Etiam rhoncus vulputate leo nec accumsan. Etiam eleifend ultrices faucibus. Vestibulum quis sem neque.` | ||
store.options.documentation = { | ||
user: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', | ||
name: { | ||
en: 'Vestibulum vitae velit id tellus vehicula dictum nec at ante. Sed pulvinar eros quis volutpat volutpat. Integer a pulvinar tellus, ut vehicula diam.' | ||
} | ||
} | ||
|
||
store.on(fortune.events.change, data => console.log(chalk.cyan( | ||
`${chalk.bold('Change')}: ${util.inspect(data, { depth: null })}`))) | ||
|
||
const server = http.createServer(fortune.net.http(store)) | ||
server.listen(port, () => console.log(chalk.blue(`Listening on port ${port}...`))) | ||
}) |