![]() ![]() Res.end('Hello, Red Hat Developer World from ' +Ĭonsole.log('Processed request for '+ req.url) Ĭonsole.log('Server running at + laddr + ':' + port + '/') Using your preferred text editor, create a file named hello-http.js with the following content: The next step is to try a slightly larger Node.js example that implements a tiny web server. Now because the program starts with `#!/usr/bin/node` you can run it directly: Hello, Red Hat Developer World from Node v10.11.0 Using a text editor such as vi, nano, or geditcreate a file named hello.js with the following content:Ĭonsole.log("Hello, Red Hat Developer World from Node " + process.version) Let’s create a Node.js program that can be run from the command line. Check the version and the path:Īlternatively If you wanted to install only a minimal set of Node.js packages, the command is:įor an explanation of the above commands, see Working with AppStreams below. For developers, using the development profile installs the libraries that enable you to build dynamically loadable modules. ![]() The default is to install a common set of runtime packages. There are several profiles available for the Node.js package. Nodejs 10 common, development, minimal, s2i Javascript runtime $ sudo yum module install nodejs/developmentįirst, see what Node.js package are available as part of the Application Stream Repository: ![]() Install latest Node.js with development libraries ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |