Commit 6c394780 authored by Emiliano Balbuena's avatar Emiliano Balbuena

(chore): Local Serve PoC command

1 merge request!173WIP: Local infrastructure provisioner
......@@ -23,6 +23,7 @@ return (async () => {
.command('up', 'Start the containers', require('./commands/up'))
.command('down', 'Stop the containers', require('./commands/down'))
.command('restart', 'Restart the containers', require('./commands/restart'))
.command('local-serve', 'Serve front locally', require('./commands/local-serve'))
.command('install', 'Installs and provisions the compose stack', require('./commands/install'))
.demandCommand(1, 'Please, specify a command.')
.help()
......
const exec = require('../lib/exec');
module.exports.handler = async argv => {
if (argv.verbose) {
// TODO: Handle this
} else if (argv.silent) {
// TODO: Handle this
}
const subprocess = exec.in('front', 'npm', ['run', 'serve:dev'], {
env: {
...process.env,
ENGINE_SECURE: '',
ENGINE_HOST: 'localhost',
ENGINE_PORT: '8080',
NODE_OPTIONS: '--max_old_space_size=4096'
}
});
subprocess.stdout.pipe(process.stdout);
subprocess.stderr.pipe(process.stderr);
await subprocess;
};
module.exports.builder = {};
Please register or to comment