Code Monkey home page Code Monkey logo

tsnode-express-mongodb-boilerplate's Introduction

Project Banner Project Banner

TSNode & MongoDB REST API

well-structured boilerplate for REST API using Node.js, TypeScript, Express & MongoDB.

contributors last update forks stars open issues license


馃摂 Table of Contents

馃専 About the Project

This repository houses a well-structured REST API for User Management powered by MongoDB with cookie based authentication, with the abilities to Create, Read, Update users. REST API built with TypeScript, Node.js, Express & MongoDB.

鈥硷笍 Folder Structure

Here is the folder structure of REST API.

TSNode-MongoDB-REST-API/
|- server/
  |-- src/
    |-- controllers/
    |-- db/
    |-- helpers/
    |-- middlewares/
    |-- router/
    |-- index.ts
  |-- .env
  |-- nodemon.json
  |-- tsconfig.json
  |-- package.json

馃懢 Tech Stack

My Skills

(back to top)

馃О Getting Started

馃攽 Environment Variables

In order to use this REST API you have to add some environment variables to .env file,

server-side [server/.env]

create .env file in server/ directory & add the following environment variables:

SESSION_TOKEN_NAME=<SESSION_TOKEN_NAME>
MONGODB_URL=<MONGODB_URL>
SECRET=<REST_API_SECRET>
PORT=<PORT> // optional, default set to 8080

鈿欙笍 Installation

Step 1:

Download or clone this repo by using the command below:

 https://github.com/ladunjexa/TSNode-MongoDB-REST-API.git

Step 2:

This REST API using NPM (Node Package Manager), therefore, make sure that Node.js is installed by execute the following command in console: (minimum Node 14.x)

  node -v

Step 3:

In server folder execute the following command to get the required packages:

  npm install

馃弮 Run Locally

Step 1:

Go to server folder and execute the following command in order to start the server:

  npm start

(back to top)

馃憢 Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

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

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  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

(back to top)

鈿狅笍 License

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

(back to top)

馃 Contact

Liron Abutbul - @lironabutbul6 - @ladunjexa

Project Link: https://github.com/ladunjexa/TSNode-MongoDB-REST-API

(back to top)

馃拵 Acknowledgements

This section used to mention useful resources and libraries that used in the REST API:

server-side

(back to top)

tsnode-express-mongodb-boilerplate's People

Contributors

imgbotapp avatar ladunjexa avatar

Watchers

 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.