egg-boilerplate-empty
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -7,10 +7,9 @@ { | ||
"dependencies": { | ||
"egg": "^0.7.0" | ||
}, | ||
"devDependencies": { | ||
"autod": "^2.7.1", | ||
"egg-bin": "^1.7.0", | ||
"egg-bin": "^1.10.0", | ||
"egg-ci": "^1.1.0", | ||
"egg-mock": "2", | ||
"eslint": "^3.10.0", | ||
"egg-mock": "^2.0.0", | ||
"eslint": "^3.13.1", | ||
"eslint-config-egg": "^3.2.0", | ||
@@ -17,0 +16,0 @@ "supertest": "^2.0.1", |
'use strict'; | ||
// npm run dev DO NOT read this file | ||
const isLocal = process.env.NODE_ENV !== 'production' && !process.env.EGG_SERVER_ENV; | ||
require('egg').startCluster({ | ||
baseDir: __dirname, | ||
port: process.env.PORT || 7001, // default to 7001 | ||
workers: isLocal ? 1 : undefined, // default to cpu count | ||
}); | ||
module.exports = 'hi, developer'; |
@@ -7,2 +7,6 @@ # {{name}} | ||
<!-- add docs here for user --> | ||
see [egg docs][egg] for more detail. | ||
### Development | ||
@@ -12,17 +16,19 @@ ```bash | ||
$ npm run dev | ||
$ open http://localhost:7001/ | ||
``` | ||
### Deploy | ||
### Unit Test | ||
- [mocha], [thunk-mocha], [power-assert], [istanbul] is build-in to [egg-bin], so you can just use it. | ||
- [power-assert] is very powerful. | ||
- see [egg unit test docs](https://eggjs.org/core/unittest) for more detail. | ||
Use `EGG_SERVER_ENV=prod` to enable prod mode | ||
### npm scripts | ||
```bash | ||
$ EGG_SERVER_ENV=prod npm start | ||
``` | ||
- Use `npm run lint` to check code style. | ||
- Use `npm test` to run unit test. | ||
- Use `npm run autod` to auto detect dependencies upgrade, see [autod](https://www.npmjs.com/package/autod) for more detail. | ||
### npm scripts | ||
- Use `npm run autod` to auto detect dependencies upgrade | ||
- Use `npm run lint` to | ||
- Use `npm test` to run unit test | ||
[mocha]: http://mochajs.org | ||
[thunk-mocha]: https://npmjs.com/thunk-mocha | ||
[power-assert]: https://github.com/power-assert-js/power-assert | ||
[istanbul]: https://github.com/gotwarlost/istanbul | ||
[egg-bin]: https://github.com/eggjs/egg-bin |
2.0.0 / 2017-01-16 | ||
================== | ||
* feat: [BREAKING_CHANGE] mv egg stuff to simple boilerplate (#5) | ||
1.1.0 / 2017-01-13 | ||
@@ -3,0 +8,0 @@ ================== |
{ | ||
"name": "egg-boilerplate-empty", | ||
"version": "1.1.0", | ||
"description": "empty boilerplate for egg simple project", | ||
"version": "2.0.0", | ||
"description": "only init basic stuff, such as eslint / test / ci ... ", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "autod": "autod", |
# egg-boilerplate-empty | ||
Boilerplate for egg simple project, as empty as possible. | ||
Boilerplate for simple project, as empty as possible. only init basic stuff, such as lint / test / ci ... | ||
also see [boilerplate - README](./boilerplate/README.md). | ||
[![NPM version][npm-image]][npm-url] | ||
@@ -29,3 +31,3 @@ [![build status][travis-image]][travis-url] | ||
```shell | ||
```bash | ||
$ npm install -g egg-init | ||
@@ -35,6 +37,5 @@ $ egg-init --type empty showcase | ||
$ npm install | ||
$ npm run dev | ||
$ open http://localhost:7001 | ||
$ # then run with `npm run dev` / `npm start` / `npm test` | ||
``` | ||
See [egg-init](https://github.com/eggjs/egg-init) for more detail. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
9935
40
0
22
52