Skip to content

Commit cd46f66

Browse files
committed
start-client.js for cross-platform support of && operator
1 parent 7d37ca2 commit cd46f66

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

start-client.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//From https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/
2+
//However, the && operator is not cross-platform (doesn't work on Windows). As
3+
//such, we've included a start-client.js script with the project.
4+
//This script will boot the client from the top-level directory in a manner that is cross-platform.
5+
const args = [ 'start' ];
6+
const opts = { stdio: 'inherit', cwd: 'client', shell: true };
7+
require('child_process').spawn('npm', args, opts);

0 commit comments

Comments
 (0)