Posts

Showing posts from July 16, 2017

Deployment

how to deploy your website Tracking your app in git   Heroku apps expect the app directory structure at the root of the repository. If your app is inside a subdirectory in your repository, it won’t run when pushed to Heroku. Before you can push an app to Heroku, you’ll need to initialize a local Git repository and commit your files to it. For example, if you have an app in a directory, myapp, then create a new repository for it: cd myapp git init Initialized empty Git repository in .git/ git add . git commit -m "my first commit" Created initial commit 5df2d09: my first commit 44 files changed, 8393 insertions(+), 0 deletions(-) create mode 100644 README create mode 100644 Procfile create mode 100644 app/controllers/source_file ... This is a local repository, now residing inside the .git directory. Nothing has been sent anywhere yet; you’ll need to create a remote and do a push to deploy your code to Heroku. Creating a Heroku remote Git remo

Building a Simple CRUD Application with Express and MongoDB

Image
Building a Simple CRUD Application with Express and MongoDB     Building a Simple CRUD Application with Express and MongoDB 22nd Jan 2016 If you know me you would have known that I started learning about the web without having gone through any computing courses in university previously. I didn’t dare to venture into server-side programming for a long time because of my background. I remember when I eventually picked up the courage to try, I had such a hard time understanding the documentations for Express, MongDB and Node that I gave up. One year later, I finally understood how to work with these tools. Then, I decided to write a comprehensive tutorial so you won’t have to go through the same headache I went through. CRUD, Express and MongoDB CRUD, Express and MongoDB are big words for a person who has never touched any server-side programming in their life. Let’s quickly introduce what they are before we diving into the tutorial. Express is a

Build a Node.js API

Image
Build a Node.js API Node.js can be intimidating to beginners. But its flexible structure and lack of strict guidelines makes it seem more complicated than it is. This tutorial is a quick and simple guide to Node.js, the Express framework, and MongoDB, focusing on the fundamental REST routes and basic database interaction. You’ll build a simple API boilerplate that can then be used as the foundation for any app. Who This Tutorial Is For : You should have a basic understanding of REST APIs and CRUD operations, plus basic JavaScript knowledge. I use ES6 (mainly fat-arrow functions), but nothing too complex. For this tutorial, you’ll create the skeleton of a back-end for a note-taking application — think You want to be able to do all four CRUD actions on your notes: create, read, update, and delete. Setting Up If you don’t have Node installed, . In a new directory, run npm init, and follow along with the prompts, giving your app the name of ‘notable’ (or whatever