Giter Site home page Giter Site logo

nadirshaaliyar / task-app-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 323 KB

A simple task app api created using nodejs and hosted in heroku.

Home Page: https://api-taskappp.herokuapp.com/

License: MIT License

JavaScript 100.00%
api heroku-deployment herokuapp javascript nodejs npm sendinblue

task-app-api's Introduction

Task App

A simple task-app-api created in nodejs and hosted in heroku.The api can be tested using postman.

Live Preview

Check this app live preview on heroku.

Technologies

Technologies I used to develop this App.

Technologies Purpose
Node.js App BackEnd.
MongoDB Local DataBase set.
MongoDB Atlas Multicloud DataBase remote set, to link with Heroku deployment.
Heroku Deploy App.
Express Create Web Server.
Mongoose Execute DB Operations.
SendInBlue For sending emails to user (only sends when creating an user or deleting an user).
BCryptJS For hashing and authenticating user password.
JSONWebToken For generating user session authentication token.
Validator For validating user emails.
Multer Upload files via API Endpoints. In this case, user avatar icon image.
Sharp Convert large images to smaller formats.
Env-cmd Deal with environment variables.
Nodemon Restart local server, for local development only.

Local Development

BackEnd only

Installation

This app is built in Node.js and uses MongoDB for local development, make sure you have both installed and set before you begin this process. I suggest you also download MongoDB Compass to get a UI view from your local database.

To install dependencies to run this code locally, follow these steps:

  1. Clone backend branch from this repo:

    git clone <repo-url>
    cd task-app
  2. Create an environment file env.env in task-app root folder, with the following variables:

    PORT=3000
    SEND_EMAIL_API_KEY=""
    JWT_SECRET=''
    MONGODB_URL_DB="mongodb://127.0.0.1:27017/task-manager-api"
    • Port is 3000 by default;
    • Get SendinblueAPI key;
    • Set up your own JWT_SECRET, it will be used for hashing and comparing hashed passwords. E.g.: 'fullstack';
    • Mongo db url is mongodb://localhost:27017/task-manager-api, 27017 is MongoDB standard port for local DB set, followed by /task-manager-api which is the DB name, you can alter if you want to.
  3. Use npm package to install dependencies:

    npm install # or, npm i

Usage

To run the app locally, follow these steps:

  1. After you define your Mongo DB path and Mongo DB databases folder, run this command to start your DB:

    sudo /path/to/mongodb/folder/bin/mongod --dbpath=/path/to/mongodb/database/folder
  2. Run one of the following commands to execute the code:

    • Standard run:

      npm run start
    • Run with nodemon (recommended):

      npm run dev

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

task-app-api's People

Contributors

nadirshaaliyar 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.