A template created with the intention of making my life easier when starting a project, and the lives of other people. :>

Overview

Express API

A simple and improved api with ExpressJS.

Language PyVersion

🗃 | Dependecies

Dependencie Version
cookie-parser ~1.4.4
cors, ^2.8.5
dotenv ^16.0.2
express ~4.16.1
morgan ~1.9.0
nodemon ^2.0.2

| How to Start?

First let's clone the repository.

$ git clone https://github.com/Ahosall/express-api-template.git

Go to the directory where the project was cloned and we will install the dependencies.

$ npm install

To start the project there are two ways:

  • Production:

    $ npm start
  • Development:

    $ npm run dev

📶 | Routes

I made some changes in the structure of both the code and the folders. The routes are in the src > routes folder. To keep a pattern of files I made a treatment to get the first name of the file.

Example:

clients.route.js

The route in the middle of the names is not mandatory, it's just a way of organizing :>

The code inside each file follows the following structure:

module.exports = [
   {
     path: "/", // Path of the route
     method: "GET", // Method to execute the route
     router: (req, res) => { // Where the magic happens~
         res.json({message: "Hiii, world!"})
     },
   },
]

I did it this way to avoid having to import the router function from express... and to maintain a greater view. :>

🛂 | Controllers & Models

Well, controllers and models follow the same patterns as always, feel free to create an issue with a new way of programming! :>

If you find bugs, report them in the issues. \( ̄︶ ̄*\)

🔰 | License

This project is licensed under the MIT License!


Made with 🤍 by Ahosall (Feh's)!
All forms of contact are on my profile!

You might also like...

An easy-to-use JavaScript library aimed at making it easier to draw on SVG elements.

svg-pen-sketch An easy-to-use JavaScript library aimed at making it easier to draw on SVG elements when using a digital pen (such as the Surface Pen).

Jul 27, 2022

A utility package for making discord-bot commands much easier to write with discord.js.

Cordcommand About A utility package for making discord-bot commands much easier to write with discord.js. Usage Example // initiate discord.js client

Dec 13, 2022

This repo contains configurations for webpack, webhint, stylelint and eslint, it is a boiler-plate template and a starting point for coming projects.

Project Name Description the project. Built With Major languages Frameworks Technologies used Live Demo (if available) Experience a live Demo 🚀 Getti

Oct 20, 2022

Clubhouse is a new type of social network based on voice—where people around the world come together to talk, listen and learn from each other in real-time.

Clubhouse is a new type of social network based on voice—where people around the world come together to talk, listen and learn from each other in real-time.

Awesome Clubhouse The clubhouse is a new type of social network based on voice—where people around the world come together to talk, listen and learn f

Nov 9, 2022

Music World is web3 app built over Solana where anyone can add their favourite songs and see the other songs that are added by different people from around the globe.

💥 Introduction Music World is web3 app built over Solana where anyone can add their favourite songs and see the other songs that are added by differe

Jun 10, 2022

Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

Starting template for building a Remix site with CloudFlare Workers (ES Modules Syntax)

May 20, 2022

🪆 Template intended to serve as a starting point if you want to bootstrap a Figma Plugin in TypeScript.

🪆 Template intended to serve as a starting point if you want to bootstrap a Figma Plugin in TypeScript.

🪆 Codely Figma Plugin Skeleton Template intended to serve as a starting point if you want to bootstrap a Figma Plugin in TypeScript. Take a look, pla

Dec 22, 2022

This template can be used as a starting point for any minting dApp on the Elrond Network.

This template can be used as a starting point for any minting dApp on the Elrond Network.

Minting dApp Template Made by Giants & NF-Tim by Creative Tim Live Demo This is a dApp template based on erd-next-starter by Giants & soft-ui-dashboar

Dec 23, 2022

Feel free to create new file, don't hesitate to pull your code, the most important thing is that the file name here must match your nickname so that file does not conflict with other people.

Hacktoberfest Indonesia Apa Itu Hacktoberfest ? Hacktoberfest adalah acara tahunan yang bertujuan untuk mendorong berkontribusi kedalam ekosistem open

Dec 15, 2022
Owner
Feh's
·────| I'am programmer, I Have no life! |────· Discord: https://discord.gg/Brpu6s26KZ
Feh's
Conways-game-of-life - A Conway's Game Of Life project using Python

conways-game-of-life A Conway's Game Of Life project using Python JavaScript Devlog January 1st 2022: also need to remember Python's syntax a bit will

Felipe Melgaço Magesty Silveira 0 Sep 23, 2022
Simple NextJS Project Template to write less boilerplate code when starting a new Next JS Project

Simple NextJS Project Template to write less boilerplate code when starting a new Next JS Project

Juan David Ramirez Mendoza 1 Feb 12, 2022
A JavaScript module that shortens your code, makes life easier, and makes development faster!

Quxt A JavaScript module that shortens your code, makes life easier, and makes development faster! Installation npm install quxt Quick Start Check ind

Qux App 5 May 8, 2022
🤝 A set of Persian Helpers for NodeJS to make your life easier

Persian Helpers Persian Helpers is a minimal NodeJS package with a set of helpers/tools specifically for the Persian/Farsi language. If you like the p

Kasra Ghoreyshi 11 Dec 22, 2022
An easy-to-use library to make your life easier when working with random numbers or random choices in javascript.

vrandom An easy-to-use library to make your life easier when working with random numbers or random choices in javascript. Table of contents Installati

Valerio Cipolla 1 Aug 16, 2022
All in one is a CLI to make your journey in web development less painful (it makes your life way easier).

All In One CLI (Aio) The Ultimate CLI for all your needs in web development. Description This is a CLI that has all the commands you need to do anythi

Я♡M...∞ 17 Sep 25, 2022
A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

JerryC 181 Oct 6, 2022
Solid Forms provides several form control objects useful for making working with forms easier.

Solid Forms Solid Forms provides several form control objects useful for making working with forms easier. Demos and examples below. # solidjs yarn ad

John 28 Jan 2, 2023