mirror of
https://github.com/eggjs/egg.git
synced 2024-12-04 07:14:30 +00:00
feat: single mode support ignore warning (#3501)
This commit is contained in:
parent
f9eea2a4da
commit
18efac152d
@ -3,7 +3,9 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = async (options = {}) => {
|
||||
console.warn('single process mode is still in experiment, please don\'t use it in production environment');
|
||||
if (!options.ignoreWarning) {
|
||||
console.warn('single process mode is still in experiment, please don\'t use it in production environment');
|
||||
}
|
||||
|
||||
options.baseDir = options.baseDir || process.cwd();
|
||||
options.mode = 'single';
|
||||
|
||||
@ -46,6 +46,10 @@ describe('test/lib/start.test.js', () => {
|
||||
app = await utils.singleProcessApp('apps/demo', { env: 'prod' });
|
||||
assert(app.config.env === 'prod');
|
||||
});
|
||||
|
||||
it('should ignoreWarng work', async () => {
|
||||
app = await utils.singleProcessApp('apps/demo', { ignoreWaring: true });
|
||||
});
|
||||
});
|
||||
|
||||
describe('custom framework work', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user