convert require to import statements
This commit is contained in:
parent
283a74f657
commit
c2b4a4ce6e
|
@ -17,7 +17,7 @@
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "nodemon --exec babel-node --presets env,stage-2 src/index.js",
|
"start": "nodemon --exec babel-node --presets env,stage-2 src/index.js",
|
||||||
"build": "node_modules/.bin/babel src/index.js -o out/counter.js"
|
"build": "babel src -o out/counter.js"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
10
src/index.js
10
src/index.js
|
@ -1,9 +1,9 @@
|
||||||
const Koa = require('koa')
|
import Koa from 'koa'
|
||||||
const Router = require('koa-router')
|
import Router from 'koa-router'
|
||||||
const JSON = require('koa-json')
|
import JSON from 'koa-json'
|
||||||
|
|
||||||
const Counter = require('./counter')
|
import Counter from './counter'
|
||||||
const Redis = require('async-redis')
|
import Redis from 'async-redis'
|
||||||
|
|
||||||
/* DEFAULTS */
|
/* DEFAULTS */
|
||||||
const REDIS_HOST = 'localhost'
|
const REDIS_HOST = 'localhost'
|
||||||
|
|
Loading…
Reference in New Issue