GithubHelp home page GithubHelp logo

ryanardd / nodejs-api-blog Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 35.1 MB

This project is a RESTful API for a blog application that comes with a login feature. This API allows users to perform CRUD operations on entities in the blog application, as well as provide user authentication through login.

JavaScript 100.00%
api blog expressjs nodejs restful-api

nodejs-api-blog's Introduction

Description

This project is a RESTful API for a blog application that comes with a login feature. This API allows users to perform CRUD operations on entities in the blog application, as well as provide user authentication through login.

Features

  • User Authentication: The API provides a login feature for authentication that allows users to update users and logout. The API also provides a feature for creating new accounts.
  • Post CRUD: Users can create, edit, and delete their blog posts according to their user login at that time
  • Category CRUD: Users can manage post categories, such as creating, editing, and deleting categories.
  • Searching: Users can perform post-searches based on specific keywords.
  • Pagination: The API provides pagination to split search results or post lists into multiple pages.

Tech Stack

Technology Description
Programming Languages Javascript (Node.js)
Framework Express.js
Database MySQL
ORM (Object-Relational Mapping) Prisma
Authentication JSON Web Token (JWT)
Middleware for Upload File Multer
Request Validation Joi
Encrypting Password Bcrypt

Getting Started

Installation

Open a terminal or command prompt and clone the blog API project repository from GitHub.

git clone <project>

Navigate to the directory of the project that was just cloned.

Run the npm install command to install all the required dependencies.

npm install

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

DATABASE_URL="mysql://user:password@host:port/database"

ACCESS_TOKEN_SECRET = "secret"

How to run

Once all dependencies are installed, run the command to start the API server.

npm run dev

nodejs-api-blog's People

Contributors

ryanardd avatar

Stargazers

 avatar Alfin Aditya 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.