Git Product home page Git Product logo

backend's Introduction

Node.js CI Quality Gate Status


Logo

NODEJS Backend Starter

NODEJS Backend starter is a highly customizable REST backend.

Report Bug Β· Request Feature

Table of Contents

About The Project

BACKEND is a highly customizable REST backend starter.

Here's why this is some cool shit:

  • Your time should be focused on creating amazing features, not thinking about authentication, user management and project structure.
  • You shouldn't have to implement simple CRUD operations over and over again.

Of course, no template will serve all projects since your needs may be different. So we made it easy to add your own mongoose plugins, services and middleware.

Built With

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

The easiest way to install mongoDB is with docker. A simple docker-compose file would look like this:

version: "3.8"
services:
  mongo:
    image: mongo:4.2.5
    ports:
      - "27017:27017"

Installation

  1. Clone the repo
git clone [email protected]:tguelcan/backend.git
  1. Install dependencies
yarn
  1. Enter your variables in .env.example and rename the file to .env

Usage

Start the server with:

yarn run dev

If it succesfully started, the output should look like this: ![yarn run dev screenshot][yarn-run-dev-screenshot]

You should now be able to see the Documentation

You can run tests with:

yarn run test

Adding routes and plugins

Adding routes

/src/api/[resource-name]

Create a folder in /api and create a index.js file

  1. Define RBAC in /api/resource-name/rbac.js
  2. Define model in /api/resource-name/model.js
  3. Write tests in /tests/api/resoure-name.test.js
  4. Add middleware in /api/resource-name/index.js
  5. Implement controllers in /api/resource-name/controller.js

Plugins

  1. Create your new plugin in a separate folder in src/plugins
  2. Import it when necessary with ~/plugins/yourplugin

Deployment

Heroku + MongoDB Atlas = πŸ‘πŸ‘„πŸ‘

  1. Create a new heroku app
  2. Enter the needed environment variables:
JWT_SECRET=
MONGODB_URI=

You can get a free mongoDB database from MongoDB Atlas.

  1. heroku git:remote -a <your-app-name>
  2. git push heroku master
  3. Your API should now be online and accessible under: https://<your-app-name>.herokuapp.com/ πŸ₯³

Roadmap

See the open issues for a list of proposed features (and known issues)

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Tayfun GΓΌlcan - @Tayfuuu

Acknowledgements

Code of Conduct

πŸ‘‹ Be nice. See our code of conduct

backend's People

Contributors

tayfun38 avatar tguelcan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.