Templates
Node.js
12min
node js is an open source, cross platform, back end javascript runtime environment that runs on a javascript engine (i e v8 engine) which was designed to build scalable backend applications microtica offers a ready to use template to deploy a node js application as part of our free templates pack you can deploy a node js application on our demo kubernetes cluster to get started when ready, you can self host node js on your own aws account and setup a production ready solution in minutes one click deploy click deploy with microtica below and follow the template steps to deploy your node js application on your aws account 1\ create an account creating a microtica account is totally free you can do it by signing up with your email or with your git account 2\ select the node js template on the left side, you can see a link to the source code of this template it will redirect you to microtica's github account 3\ create git repository as a first step, you need to connect a git account (github, bitbucket, gitlab, or codecommit) microtica defines a repository name by default for each template, but you can change it if you already have a git account connected to microtica, you can choose it from the list we will create a new repository on your account with the provided name, and every git push will be deployed automatically in microtica follow this guide on how to import your existing application in microtica https //docs microtica com/import an existing nodejs application , if you already have a node js application source code 4\ select a cluster the next step is choosing the kubernetes cluster where your application will deploy there are three options you can select to run your container app create a new eks cluster on the spot connect an existing cluster 4 1 create a new eks cluster on the spot if you want to deploy your node js application on your own aws account, you can create an aws managed kubernetes (eks) cluster, by clicking on the create amazon eks cluster button this is the recommended option for production applications, as it gives you full ownership of your cloud infrastructure and applications this action will open the popup shown on the image above you can select the environment in which you'd want this cluster to be deployed if you don't have an existing environment, you can create one by selecting the create environment action from the dropdown menu once you select an environment, the next step is to select an aws account and region where the eks cluster will be deployed if you don't have a connected aws account, you can connect one right here by clicking the connect aws account button this will initiate a cloudformation stack that will give microtica permissions to provision infrastructure on your aws account once you create the stack, the connection will be established automatically and you'll be able to see the aws account in the dropdown list of accounts select the account, select a region, and then click on deploy to start the deployment of your environment deploying a new kubernetes cluster on your aws account could take up to 15 mins 4 2 connect an existing cluster in microtica you can also connect an existing kubernetes cluster that you have and deploy your applications there you can connect kubernetes clusters running on basically any cloud provider or on premise by connecting a cluster you can use the full capabilities of microtica’s kubernetes automation to connect an existing kubernetes cluster in microtica and deploy your node js application there, follow the documentation linked below👇 connect an existing kubernetes cluster docid jijdoljpe9gsunp7ktkz 5\ deploy the template to your cluster once you’re done with the cluster selection, you can go ahead and trigger a deployment of the environment by clicking on the deploy button it takes approximately 4 5 minutes for this application to be deployed on the cloud in the meantime, you can follow the detailed deployment logs by clicking the view logs button 6\ access the application when the deployment is finished, you will see a view applications button, that leads you to the apps tab inside the environment here you can see all your live applications that are deployed and currently running on the cloud select your node js application to navigate to the overview page, where you have some basic information about the app by clicking on the domain field or the visit button, you can preview your application live in the browser for even more information, you can also look at the deployments and monitoring tabs, where you have the pipeline history, resource consumption metrics, and logs for your instances to learn more about how to scale your node js application in microtica, read the following article about scaling applications in microtica https //docs microtica com/scaling optimize aws cost to save costs while using node js in a non production environment, consider running it from monday to friday, 8 hours per day this schedule can help you achieve at least a 65% reduction in your cloud expenses in the resources or cost dashboard , create a saving schedule to implement these cost saving measures