diff --git a/.babelrc b/.babelrc deleted file mode 100644 index d4f4c84..0000000 --- a/.babelrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "presets": ["es2015-node5"], - "plugins": [ - "syntax-async-generators", - "transform-async-to-generator" - ] -} \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e920c16..0000000 --- a/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -node_modules - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 6b03e4a..0000000 --- a/.jshintrc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "eqeqeq": true, - "forin": true, - "immed": true, - "newcap": true, - "noarg": true, - "esnext": true, - "noempty": true, - "nonew": true, - "undef": true, - "unused": "vars", - "strict": true, - "trailing": true, - "noyield": true, - "indent": 2, - "module": true, - "quotmark": "single", - "maxdepth": 4, - "boss": true, - "eqnull": true, - "esversion": 6, - "globalstrict": true, - "smarttabs": true, - "browser": true, - "node": true, - "predef": [ - "describe", - "it", - "before", - "beforeEach", - "after", - "afterEach" - ] -} \ No newline at end of file diff --git a/dist/.gitkeep b/dist/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/index.js b/index.js deleted file mode 100644 index ad6d3cd..0000000 --- a/index.js +++ /dev/null @@ -1,2 +0,0 @@ -require('babel-register'); -require('./server'); diff --git a/package.json b/package.json index cb6de13..2e42967 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nfp_moe", - "version": "1.0.0", + "version": "2.0.0", "description": "NFP Moe website", "main": "index.js", "directories": { @@ -20,17 +20,7 @@ }, "homepage": "https://github.com/nfp-projects/nfp_moe", "dependencies": { - "babel-plugin-syntax-async-generators": "^6.3.13", - "babel-plugin-transform-async-to-generator": "^6.4.6", - "babel-preset-es2015-node5": "^1.1.2", - "babel-register": "^6.4.3", - "bunyan": "^1.5.1", - "koa": "^2.0.0-alpha.3", - "koa-router": "^7.0.1", - "lodash": "^4.0.1", - "nconf": "^0.8.2" }, "devDependencies": { - "nodemon": "^1.8.1" } } diff --git a/server/config.js b/server/config.js deleted file mode 100644 index 350c245..0000000 --- a/server/config.js +++ /dev/null @@ -1,83 +0,0 @@ -import _ from 'lodash'; -import nconf from 'nconf'; - - - -// Config follow the following priority check order: -// 1. Arguments -// 2. package.json -// 3. Enviroment variables -// 4. config/config.json -// 5. default settings - - -//Load arguments as highest priority -nconf.argv(); - - - -//Load package.json for name and such -var pckg = require('./package.json'); -pckg = _.pick(pckg, ['name','version','description','author','license','homepage']); - - - -//If we have global.it, there's a huge chance -//we're in test mode so we force node_env to be test. -if (typeof global.it === 'function') { - pckg.NODE_ENV = 'test'; -} - - - -//Load overrides as second priority -nconf.overrides(pckg); - - - -//Load enviroment variables as third priority -nconf.env(); - - - -//Load any overrides from the appropriate config file -if (nconf.get('NODE_ENV') === 'test') { - //Load the config test file if we're in test mode - nconf.file('../config/config.test.json'); -} -else { - //Otherwise load from config.json if it exists. - nconf.file('../config/config.json'); -} - - - -//Default variables for required database and other settings. -nconf.defaults({ - NODE_ENV: 'development', - server: { - port: 3000, - host: '0.0.0.0', - url: 'http://localhost:3000' - }, - frontend: { - url: 'http://localhost:3000' - }, - bunyan: { - name: pckg.name, - streams: [{ - stream: 'process.stdout', - level: 'debug' - } - ] - }, - jwt: { - secret: 'this-is-my-secret', - options: { - expiresIn: 60 * 24 * 7 * 60 //7 days - } - }, - bcrypt: 5 -}); - -module.exports = nconf; diff --git a/server/index.js b/server/index.js deleted file mode 100644 index 9fea109..0000000 --- a/server/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import Koa from 'koa'; -const app = new Koa(); - -// response -app.use(async (ctx) => { - ctx.body = 'Hello World'; -}); - -app.listen(3000, () => console.log('server started 3000')); - -export default app;