Oracle Magazine, May/June 2018
Database Developer OPEN SOURCE ORACLE MAGAZINE MAY JUNE 2018 95 process exit 1 Non zero failure code startup The main module brings in the web server module and then it defines and invokes an async function named startup Because the web server modules initialize function returns a promise you can use it with async await and wrap it in a try catch block follow this link to learn more about async await If the initialize function finishes successfully the web server will be running otherwise any exceptions will be caught and handled All you need to do now is initialize npm and install Express then you can run the app Run the following commands in the terminal from the hr_ app directory npm init y npm install express s node The npm init command creates the package json file which npm uses as a manifest file the y flag accepts the default options The npm install command is used to install Express the s flag adds Express to the list of dependencies in package json npm stores the modules you install in the node_ modules directory and also creates a file named package lock json to ensure that module trees are identical across a team of developers
You must have JavaScript enabled to view digital editions.