Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate misc files to ES2015
- Loading branch information
Showing
2 changed files
with
13 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
var fs = require('fs') | ||
'use strict' | ||
|
||
var Server = require('./server') | ||
var configurationFile = process.argv[2] | ||
var fileContents = fs.readFileSync(configurationFile, 'utf-8') | ||
const fs = require('fs') | ||
|
||
const Server = require('./server') | ||
const configurationFile = process.argv[2] | ||
const fileContents = fs.readFileSync(configurationFile, 'utf-8') | ||
fs.unlink(configurationFile, function () {}) | ||
var data = JSON.parse(fileContents) | ||
var server = new Server(data) | ||
const data = JSON.parse(fileContents) | ||
const server = new Server(data) | ||
server.start(data) |