1. refactored to use get/set instead of raw lens
2. updated webpack dev config to use python proxy api server
This commit is contained in:
@@ -113,13 +113,11 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
// }
|
||||
// );
|
||||
startWebPackDevServer(()=>{
|
||||
// child_process.spawn('webpack',['--watch','--config','config/webpack.config.flask.js'],{
|
||||
// stdio:'inherit'
|
||||
// });
|
||||
child_process.spawn('python',['walle_server.py'],{
|
||||
stdio:'inherit'
|
||||
});
|
||||
});
|
||||
|
||||
// Create the production build and print the deployment instructions.
|
||||
function build(previousFileSizes) {
|
||||
console.log('Creating an optimized production build...');
|
||||
@@ -169,10 +167,11 @@ function copyPublicFolder() {
|
||||
function startWebPackDevServer(pyServer){
|
||||
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
|
||||
const HOST = process.env.HOST || '0.0.0.0';
|
||||
fs.emptyDirSync(paths.appBuild);
|
||||
fs.ensureSymlink(paths.appPng,path.resolve(paths.appBuild,'png'));
|
||||
// Merge with the public folder
|
||||
copyPublicFolder();
|
||||
// fs.emptyDirSync(paths.appBuild);
|
||||
// fs.ensureSymlink(paths.appPng,path.resolve(paths.appBuild,'png'));
|
||||
// // Merge with the public folder
|
||||
// copyPublicFolder();
|
||||
|
||||
// We attempt to use the default port but if it is busy, we offer the user to
|
||||
// run on a different port. `detect()` Promise resolves to the next free port.
|
||||
choosePort(HOST, DEFAULT_PORT)
|
||||
@@ -201,8 +200,9 @@ function startWebPackDevServer(pyServer){
|
||||
}
|
||||
if (isInteractive) {
|
||||
clearConsole();
|
||||
const urls = prepareUrls(protocol, HOST, '5000');
|
||||
const pyurls = prepareUrls(protocol, HOST, '5000');
|
||||
pyServer();
|
||||
// openBrowser(pyurls.localUrlForBrowser);
|
||||
openBrowser(urls.localUrlForBrowser);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user