×

How to deploy a Node.js app in Coded and save your time

This is the first guide from our #askcoded series where we want to show you how DevOps can be easy and how you can save a lot of time with Coded. Today we will deploy a Node.js app on a Digital Ocean server (sure you can use any VPS, cloud or dedicated server with Ubuntu 18.04 and public IP, for example, OVH, Hetzner, Linode, etc).

Steps:

  • Order a server
  • Install Coded Node on a server
  • Install Coded CLI on a local system
  • Create & deploy a Node.js app
Order a server

You need a server with Ubuntu 18.04 and public IP where you will deploy your apps. .Use these coupons to get a server for free for a month. We don't describe here how to order a server but don't forget to select Ubuntu 18.04 and add your SSH key (we recommend to use SSH instead of password) during server setup.

Install Coded Node

Coded Node is a microservice which manages apps deployed on each server. To install it

  • SSH into your server
ssh root@your_ip
wget -O - https://api.coded.sh/coded-node.sh | bash
install-coded-node

That's all - your Coded Node is ready to host apps.

Install Coded CLI

Coded CLI is used to create projects, view project info, etc. You should install it on your local system where you develop your projects.

How to install Coded CLI:

npm install -g coded
  • Launch Coded
coded

That's all. Log in, select New Project in Main Menu, set the app's name and other parameters and your app will be ready within a few minutes. To check the status of your app select My Projects from the Main Menu.

Happy coding and feel free to contact us if you have any questions or suggestions.