diff --git a/package.json b/package.json index e4b45b5..c2eeea4 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "scripts": { "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": [], "author": "", diff --git a/src/index.js b/src/index.js index 3d8a363..79aedaa 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,9 @@ -const Koa = require('koa') -const Router = require('koa-router') -const JSON = require('koa-json') +import Koa from 'koa' +import Router from 'koa-router' +import JSON from 'koa-json' -const Counter = require('./counter') -const Redis = require('async-redis') +import Counter from './counter' +import Redis from 'async-redis' /* DEFAULTS */ const REDIS_HOST = 'localhost'