-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Upgrade to use nime 0.2.0 and refactor the architecture
- Loading branch information
Showing
3 changed files
with
128 additions
and
57 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,16 @@ | ||
'use strict'; | ||
|
||
let nime = require('nime'); | ||
let fs = require('fs'); | ||
let path = require('path'); | ||
|
||
let service = require('./index'); | ||
|
||
let configFile = fs.readFileSync(path.join(process.cwd(), 'ime.json'), 'utf8'); | ||
let config = JSON.parse(configFile); | ||
|
||
config['textService'] = service; | ||
|
||
let server = nime.createServer(undefined, [config]); | ||
|
||
server.listen(); |