Setup MongoDB with Koa.js

I’m building a Koa.js server and need to connect to MongoDB to store and retrieve data. Here is how to do it with some simple steps: Step 1: Connect the database before Koa app initialised const initDB = require(‘./database’); initDB(); const app = new Koa(); Inside the database.js, import mongoose. You will need to npm… Continue reading Setup MongoDB with Koa.js

Deploy Koa.js Application to AWS EC2 ubuntu instance

I am developing a Koa application, which is a new web framework designed by the team behind Express. Here is a step-by-step tutorial on how to deploy the koa.js application on your Amazon Web Service (AWS) ubuntu server. Firstly, launch the ubuntu instance on AWS. Then you need to change the security group. Otherwise if… Continue reading Deploy Koa.js Application to AWS EC2 ubuntu instance