Skip to content

Commit

Permalink
fix(angular): add missing file to angular project (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lakhdar authored Mar 18, 2021
1 parent 1611ad9 commit 4a406c8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/angular/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Outputs
src/**/*.js
src/**/*.js.map
src/**/*.d.ts
dist

# IDEs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const {spawnSync} = require('child_process');
const {resolve, join} = require('path');
const {config} = require('dotenv');
config();

function getEnvVariables() {
var envVars = Object.assign({}, process.env);
return envVars;
}

function startServer() {
const serverPath = join(process.cwd(), 'server');
const child = spawnSync('npm', ['run', 'start'], {
stdio: 'inherit',
env: getEnvVariables(),
cwd: resolve(serverPath),
});
if (child.status !== 0) {
process.exit(child.status);
}
}

function main() {
startServer();
}

main();

0 comments on commit 4a406c8

Please sign in to comment.