Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
"description": "--- page_type: sample languages: - javascript - nodejs - products: - azure - azure-communication-services ---",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"setup": "cd Server && npm install && cd ../Chat && npm install && cd ..",
"start": "cd Chat && npm run start && cd ..",
"build": "cd Server && npm run build && cd ../Chat && npm run build && cd ..",
"package": "cd Chat && npm run package && cd .."
"setup:chat": "cd Chat && npm install",
"setup:server": "cd Server && npm install",
"setup": "npm run setup:chat && npm run setup:server",
"start": "node startChat.js",
"build:chat": "cd Chat && npm run build",
"build:server": "cd Server && npm run build",
"build": "npm run build:chat && npm run build:server",
"package": "cd Chat && npm run package"
},
"repository": {
"type": "git",
Expand Down
12 changes: 12 additions & 0 deletions startChat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { spawn } = require('child_process');

// This script will spawn a new process to run the npm start command inside the Chat directory.
const child = spawn('npm', ['run', 'start'], {
stdio: 'inherit',
cwd: './Chat',
shell: true
});

child.on('exit', (code) => {
process.exit(code);
});