-
Notifications
You must be signed in to change notification settings - Fork 0
Add REST API code from the chill-dashboard #1
Conversation
.eslintrc
Outdated
@@ -0,0 +1,30 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy the .eslintrc.yml
file from the chill repo instead. https://github.com/leapfrogtechnology/chill/blob/master/.eslintrc.yml
|
.nodemonignore
Outdated
test | ||
|
||
# Other directories | ||
src/server/seeds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/server?
.postcssrc.js
Outdated
@@ -0,0 +1,8 @@ | |||
// https://github.com/michael-ciniawsky/postcss-load-config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a frontend specific file. Not needed here
.travis.yml
Outdated
@@ -0,0 +1,10 @@ | |||
language: node_js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which editor are you using? It's putting unnecessary characters at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VS code
package.json
Outdated
}, | ||
"keywords": [ | ||
"chill", | ||
"dashboard" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest-api
package.json
Outdated
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-es2016": "^6.16.0", | ||
"babel-preset-es2017": "^6.16.0", | ||
"babel-preset-react": "^6.23.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
package.json
Outdated
"babel-loader": "^6.2.10", | ||
"babel-plugin-istanbul": "^4.1.1", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.0", | ||
"babel-plugin-transform-react-remove-prop-types": "^0.3.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need
package.json
Outdated
"mocha": "^3.2.0", | ||
"node-sass": "^4.5.0", | ||
"nodemon": "^1.11.0", | ||
"postcss-loader": "^1.3.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
package.json
Outdated
"nodemon": "^1.11.0", | ||
"postcss-loader": "^1.3.3", | ||
"rimraf": "^2.5.4", | ||
"sass-loader": "^6.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
package.json
Outdated
"sinon": "^2.1.0", | ||
"sinon-chai": "^2.8.0", | ||
"supertest": "^2.0.1", | ||
"url-loader": "^0.5.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
src/services/status.js
Outdated
* @return {Promise} | ||
*/ | ||
export async function getStatus(id) { | ||
return await new Status({ id }).fetch() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let status = await new Status({ id }).fetch();
if (!status) {
throw new Boom.notFound('Service not found');
}
return status;
src/utils/logger.js
Outdated
}) | ||
] | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@badyakarprabin I think you've made some changes in this log format in the chill right? Copy that from here https://github.com/leapfrogtechnology/chill.
.babelrc
Outdated
"es2015", "es2016", "es2017" | ||
], | ||
"comments": false, | ||
"env": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need this block
.eslintrc
Outdated
@@ -0,0 +1,30 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this file. We already have .eslintrc.yml
file now.
I'll finalize this PR. |
The question is how many repositories will me make? |
Nice question 😄. |
And why do we need those configuration files here? |
They aren't actually separate config files, both the rest api and monitor needs to access the same Also, as we're thinking of moving the persistence logic from |
Extract the REST API express server code from chill-dashboard to this repository.
Note: Some of the files here (eg: config.js, logger.js etc) are complete copy-paste from those from the chill repository, we'll need to extract these common codes, utils, and initialization/config stuff to a new package called
chill-core
to avoid code duplication.