Oracle Magazine, May/June 2018
Database Developer OPEN SOURCE Figure 1 Accessing the web server and the application Do you see a message telling you that the web server is listening on localhost 3000 Congratulations youve created an Express based web server Open Firefox and navigate to http localhost 3000 as shown in Figure 1 There it is yet another Hello World Although not particularly exciting its an important first step for your API When youre ready you can shut down the server by returning to the terminal and pressing Ctrl c CONTROLLING THE SHUTDOWN Although shutting down by pressing Ctrl c works you didnt have much control over how it happened To control the shutdown process you will need to explicitly close the web server and exit the Node js process Append the following code to the bottom of the web server module ORACLE MAGAZINE MAY JUNE 2018 96 previous code above this line function close return new Promise resolve reject
You must have JavaScript enabled to view digital editions.