![]() Therefore, open your favorite web browser and navigate to: By default, your Express application should listen on port 3000. bin/www &Ĭongratulations, you have successfully set up your first Express application. For that purpose, you can execute the following command: node. The last thing you need to do is to start your application and access it using a web browser. To set up your first project, run the following command:Īnd then: npm install 8. ![]() To ensure that you are logged as the newly created system user you can run the command: whoamiĬreate a directory for your first Express project and navigate to that directory: mkdir first_project Log out from your system and log in again using the newly created system user. Once you are done, create a new system user. Run the following command: npm install -g express express-generator 6. After the installation is completed, you can continue and install Express.js. The installation of NodeJS could take a few minutes. To extract the archive and install NodeJS from source execute the following commands one by one: tar -xzvf node-v0.12.7.tar.gz Once NodeJS is downloaded on your CentOS VPS, you can move on to the next step. Next, go ahead and download the latest stable release of NodeJS. For that purpose you can use the following command: yum -y groupinstall "Development Tools" 3. Since we are going to install NodeJS from source, you will need to install all the required dependencies on your server. Extract the archive and install Node.jsįirst of all, you need to connect to your server via SSH and upgrade all your system software to the latest version available by executing the following command: yum -y update 2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |