create-nocobase-app
Advanced tools
Comparing version 0.5.0-alpha.21 to 0.5.0-alpha.22
@@ -66,4 +66,3 @@ "use strict"; | ||
context: _objectSpread({ | ||
version: require('../../package').version, | ||
conventionRoutes: _this.args.conventionRoutes | ||
version: require('../../package').version | ||
}, _this.tplContext), | ||
@@ -70,0 +69,0 @@ path: (0, _path().join)(__dirname, '../../templates/AppGenerator'), |
@@ -100,3 +100,3 @@ "use strict"; | ||
console.log(` ${cmd} install`); | ||
console.log(` ${cmd} nocobase init --import-demo`); | ||
console.log(` ${cmd} nocobase init${(0, _utils2.hasYarn)() ? '' : ' --'} --import-demo`); | ||
console.log(` ${cmd} start`); | ||
@@ -157,3 +157,3 @@ console.log(); | ||
console.log(` ${_utils().chalk.cyan('cd')} ${directory}`); | ||
console.log(` ${cmd} nocobase init --import-demo`); | ||
console.log(` ${cmd} nocobase init${(0, _utils2.hasYarn)() ? '' : ' --'} --import-demo`); | ||
console.log(` ${cmd} start`); | ||
@@ -160,0 +160,0 @@ console.log(); |
@@ -60,4 +60,4 @@ "use strict"; | ||
function runInit(path) { | ||
return runYarn(path, ['run', 'nocobase', 'init', '--import-demo']); | ||
return runYarn(path, ['run', 'nocobase', 'init', hasYarn() ? '--import-demo' : '-- --import-demo']); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "create-nocobase-app", | ||
"version": "0.5.0-alpha.21", | ||
"version": "0.5.0-alpha.22", | ||
"main": "lib/index.js", | ||
@@ -26,3 +26,3 @@ "types": "lib/index.d.ts", | ||
}, | ||
"gitHead": "181872cf075dd9e65f9f2ff0d1ff18c541e0d7cd" | ||
"gitHead": "22534716700c4ade1727b6e04543725c5e4f14f2" | ||
} |
@@ -10,2 +10,3 @@ import { defineConfig } from 'umi'; | ||
export default defineConfig({ | ||
favicon: '/favicon.png', | ||
nodeModulesTransform: { | ||
@@ -15,15 +16,13 @@ type: 'none', | ||
define: { | ||
'process.env.API_URL': process.env.API_URL || "http://127.0.0.1", | ||
'process.env.API_PORT': process.env.API_PORT || "13001", | ||
'process.env.API_URL': process.env.API_URL || 'http://127.0.0.1', | ||
'process.env.API_PORT': process.env.API_PORT || '13001', | ||
}, | ||
proxy: { | ||
'/api': { | ||
'target': `http://localhost:${process.env.API_PORT || "13001"}/`, | ||
'changeOrigin': true, | ||
'pathRewrite': { '^/api': '/api' }, | ||
target: `http://localhost:${process.env.API_PORT || '13001'}/`, | ||
changeOrigin: true, | ||
pathRewrite: { '^/api': '/api' }, | ||
}, | ||
}, | ||
routes: [ | ||
{ path: '/', exact: false, component: '@/pages/index' }, | ||
], | ||
routes: [{ path: '/', exact: false, component: '@/pages/index' }], | ||
fastRefresh: {}, | ||
@@ -30,0 +29,0 @@ locale: { |
import path from 'path'; | ||
import Application from '@nocobase/server'; | ||
import dbConfig from './config/db'; | ||
@@ -7,3 +8,3 @@ const start = Date.now(); | ||
const api = new Application({ | ||
database: require('./config/db').default, | ||
database: dbConfig[process.env.DB_DIALECT || 'sqlite'], | ||
resourcer: { | ||
@@ -33,3 +34,3 @@ prefix: '/api', | ||
dist: path.resolve(process.cwd(), './dist'), | ||
importDemo: true, | ||
// importDemo: true, | ||
}); | ||
@@ -36,0 +37,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
49138
38
666