GithubHelp home page GithubHelp logo

jeffrdev / node-project-structure Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 113 KB

A directory structure for projects with node js

License: MIT License

Shell 100.00%
node nodejs node-server node-directory-structure

node-project-structure's Introduction

Node Project Structure

The philosophy of this repository is to provide templates for creating projects with node. Create something amazing! without worrying about the little things.

Branches

Each of the branches of this repository except the main branch has a project template adapted to different technologies.

main ๐Ÿ“‚

This branch provides a template for creating projects with Node. You can adapt it to the technologies you want to use.

Table of Contents

Folder and File Structure

โ–ฝ ๐Ÿ“ node-project-structure
  โ–ฝ ๐Ÿ“ src
    โ–ฝ ๐Ÿ“ app
      โ–ฝ ๐Ÿ“ Controllers
          ๐Ÿ“„ UserController.js
      โ–ฝ ๐Ÿ“ Helpers
          ๐Ÿ“„ Jwt.js
      โ–ฝ ๐Ÿ“ Middleware
          ๐Ÿ“„ VerifyToken.js
      โ–ฝ ๐Ÿ“ Models
          ๐Ÿ“„ User.js
      โ–ฝ ๐Ÿ“ Services
          ๐Ÿ“„ UserService.js
    โ–ฝ ๐Ÿ“ config
      	๐Ÿ“„ database.js
    โ–ฝ ๐Ÿ“ public
        ๐Ÿ“„ robots.txt
    โ–ฝ ๐Ÿ“ routes
        ๐Ÿ“„ api.js
    โ–ฝ ๐Ÿ“ views
        ๐Ÿ“„ index.ejs
      ๐Ÿ“„ app.js
  โ–ฝ ๐Ÿ“ tests
      ๐Ÿ“„ user.test.js
    ๐Ÿ“„ .env
    ๐Ÿ“„ .env.example
    ๐Ÿ“„ .gitignore
    ๐Ÿ“„ index.js
    ๐Ÿ“„ LICENSE
    ๐Ÿ“„ README.md

The files found in each folder were created so that the folders were uploaded to the repository.

Getting Started

Use the option that suits you.

Use this template

This repository is a template so you can use it by clicking on Use this template and following the steps.

Git

Locate with the console in the directory where you want to clone the repository and execute the following:

Clone the main branch of the Node Project Structure repository:

git clone --branch main https://github.com/santiagor0jas/node-project-structure.git

Download Zip

Download the repository of this branch.

Visiting the following link:

https://github.com/santiagor0jas/node-project-structure/archive/refs/heads/main.zip

Or using the Github Download Function.

Project Setup

  1. After cloning or downloading the repository, a folder named node-project-structure will be created in the selected directory, remember to rename this folder, for example my-app.

    Please note that if your project needs to be licensed, modify the my-app/LICENSE file, otherwise delete it.

  2. Now go to the my-app folder using the console and run the following to configure git to point to your repository.

    git remote set-url origin <repository-url>
  3. Initialize project:

    It is recommended to set git to point to your repository before running this command.

    npm init -y

License

This project is licensed under the MIT License.

node-project-structure's People

Contributors

jeffrdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

olivianik

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.