Evolution of a Node.Js API, Zoe.Js — Introduction

Adams Academy
The Startup
Published in
3 min readJul 17, 2020

This series is about a Node.js API called Zoe.js. It’s basically takes Express.js and applies various packages inside an organized code structure.

Zoe.js stands for `Zen of Express.js`

The purpose of this series is to introduce Node.js, Express.js and one of the best Node.js packages to build a simple, ready to use API, Zoe.js, from the ground up.

Orgranization

The series begins by introducing Node.js, its default package manager, modules, a simple web server, Express.js and its middlewares.

Next, we take a quick look at HTTP, REST APIs and MongoDB.

From there, we move on the project itself, I show you the project we build with Zoe.js, then we start to build the workspace and lay down the rules of our code style.

In the rest of the series we build the API itself which contains these components:

  • Layers (Controller, Service, Database)
  • Error handling
  • Logging
  • Pagination
  • Console commands (CLI)
  • Events
  • Mail
  • Security (Authentication and Authorization)
  • API Testing

Finally, the entire stack and the API comes to life as:

Rules of Zoe.js

Zoe.js is really just a frame around Express.js and Node.js packages, so there are no rules in terms of usage.

I build this “framework” to introduce the Node.js platform and its ecosystem, and if somebody builds something with it, thats a big plus.

Break the rules. Maybe you build something small that doesn’t need the service layer, because you never reuse your business logic, or you merge the service and the database layer, because you never change your database system (Did anyone ever do that?). It depends on your needs and don’t forget that everything is a tradeoff.

Build applications which fits your needs. Don’t make it too abstract for the future you don’t know. Try to make it simple and clean.

These are the rules of Zoe.js.

Requirements

These are the minimal requirements to take this series:

  • Client-Server model
  • Javascript
  • ECMAScript 6

Article Series

This article (Chapter 1) is part of the Zoe.js article series. Below you can find the Next chapter and all the available Chapters.

--

--

Adams Academy
The Startup

Adams Academy helps you to cut through the noise and understand programming languages, web development with simple programming tutorials.