NodeJs: Difference between revisions

From bibbleWiki
Jump to navigation Jump to search
Line 4: Line 4:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
"scripts": {
"scripts": {
   "start": "run-p start:dev start:api"
   "start": "run-p start:dev start:api",
   "startdev: "webpack-dev-server --config webpack.config.dev.js --port 3000"
   "startdev: "webpack-dev-server --config webpack.config.dev.js --port 3000",
   "prestart:api": "node tools/createMockDb.js"
   "prestart:api": "node tools/createMockDb.js",
   "start:api: "node tools/apiServer.js"
   "start:api": "node tools/apiServer.js"
};
};
</syntaxhighlight>
</syntaxhighlight>


The run-p runs multiple jobs, pre<value> runs the command before the value without pre
The run-p runs multiple jobs, pre<value> runs the command before the value without pre

Revision as of 00:14, 8 June 2020

Setup

Running start up scripts in node

"scripts": {
  "start": "run-p start:dev start:api",
  "startdev: "webpack-dev-server --config webpack.config.dev.js --port 3000",
  "prestart:api": "node tools/createMockDb.js",
   "start:api": "node tools/apiServer.js"
};

The run-p runs multiple jobs, pre<value> runs the command before the value without pre