Develeoment & test environment for Kii Cloud servercode.
ES6, Developer tool in Chronium for debug, Easy build, Pre-configured tools for JavaScript like testing and linting, and more!
This repository allows you to do
- Write servercode in ES6 which supports
class
,=>
(arrow function) or others - Generate single .js file combined with webpack for easy deployment
- source-map support. You can view source easily and set breakpoints in developer tool of Chronium.
- Execute your code on an Electron app with some features.
- Support sync & async call.
- Support
getAccessToken
andgetAppAdminContext
. - Support timeout which can be configured by yourself.
- Debugging with developer tool of Chronium. Breakpoints work!
- etc.
- Emulate REST API to invoke endpoints you define.
- Testing with
mocha
andpower-assert
. - ESLint is configured.
Not supported.
- Verification for whether it's enabled to be uploaded or not.
- Limitation for step count.
require
for underscore doesn't work well.
In 3 minutes! without time to download modules.
To configure your app, open config.js
and edit three properties
app_id
, app_key
and api_endpoint
. Or export three envvars.
app_id: "", // envvar: KII_APP_ID
app_key: "", // envvar: KII_APP_KEY
api_endpoint: "", // envvar: KII_API_ENDPOINT
Set up your PATH.
# To add to PATH
$ PATH=`pwd`/node_modules/.bin
or
$ source .env
[0]
, [1]
and [2]
express different terminal.
$ npm install
[0]$ npm run build:debug
Hash: da55844f3f161a01ed76
Version: webpack 1.12.9
...
[1]$ npm start
...
[2]$ make sync
[2]$ make async
You can see a window like this.
Your sources are in src
directory. Please edit them as you want.
You need to use src/main.js
which exposes public entry names can be invoked.
If you want to change it, ./debug.js
and ./release.js
.
Step execution works! Set breakpoints wherever you want.
$ npm test
Test files are in ./test
directory.
$ npm run lint
./dist/bundle.debug.js
based ondebug.js
../dist/bundle.release.js
based onrelease.js
.
Basically you don't need to edit debug.js
.
On the other hand, you need to edit release.js
to export functions you want. Please follow existing code.
$ npm run build:release
This command generates minified ./dist/bundle.release.min.js
.
Open ./config.js
and fill username
and password
with your values.
Open ./config.js
and fill client_id
and client_secret
with your values.