Project Setup

Project Setup 2min read

Post number 01 of a series of posts on writing and Express Sequelize API server.

Code reference: [Git Commit](

Create Github Repository

Start by creating a new repository on Github, initialising it with

  • A readme file
  • A .gitignore file for node
  • A MIT license
Github initialisation options

Clone Repository Onto Local Machine

Grab the repository https link, open up your favourite terminal and navigate to the root code workspace folder.

Clone the previously created remote project repository and change directory into new local repository

git clone git clone
cd express-sequelize-api
Clone Repository & Change Directory in Local Repository

Create NPM Package

npm is the package manager for Node.js.

Once we have cloned the repository, it is time to setup the npm package.json file by initialising npm

npm init
Terminal command to initiate npm package.json

The command will ask you a set of questions to pre-populate the package.json

package name: (express-sequelize-api) 
version: (1.0.0) 0.1.0
description: Express Sequelize API Template
entry point: (index.js) src/app.js
test command: 
git repository: ( 
keywords: Express, Sequelize, RESTful, API
author: Ian Teda <>
license: (ISC) MIT
NPM init questions

After you have answered the questions npm will generate a package.json file similar to the below.

  "name": "express-sequelize-api",
  "version": "0.1.0",
  "description": "Express Sequelize API Template",
  "main": "src/app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "repository": {
    "type": "git",
    "url": "git+"
  "keywords": [
  "author": "Ian Teda <>",
  "license": "MIT",
  "bugs": {
    "url": ""
  "homepage": ""
npm init generated package.json file

Setup Babel

Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript

Next we want to setup babel so we can write in ECMAScript

Install the required babel packages.

npm install --save-dev @babel/core @babel/node @babel/preset-env @babel/plugin-transform-runtime
Terminal command to install npm packages for babel

Now we have the required packages install lets configure the project to use babel with the .babelrc file


  "presets": [
  "plugins": [
  "sourceMaps": "inline",
  "retainLines": true

Setup Nodemon

Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development.

To save us having to restart the express server every time a file changes, we are going to use Nodemon to help us out.

npm install --save-dev nodemon
Terminal command to install the required Nodemon npm package

Now that the Nodemon package is install we need to configure the project to use it with through the nodemon.json configuration file


  "watch": [
  "verbose": true,
  "ignore": ["*.test.js", "*.spec.js"]

Commit Changes to Git and Push to Remote

Now we need to commit the changes to the repository

git add .
git commit -m "Initial project setup"
git push -u origin main
Terminal command to commit file changes to repository


Keep up to date with Ian Teda

Get the latest posts delivered right to your inbox
BJJ Hierarchy of Needs
Next Post:
Express Setup
Express Setup

Related Posts:

Express Setup

Post 02 in a series of posts about writing an Express REST API using Sequelize object rational mapping for SQL databases. In this post we will steps through setting up

Goto Post 3 min read
Ember Electron SQLite - The Initialisation

How to scaffold out an Ember Electron SQLite App

Goto Post 3 min read