Code Monkey home page Code Monkey logo

script-manager-backend's Introduction

Backend Node.js Script-management App

This is a Node.js app that allows users to manage scripts. It provides the following routes:

Scripts Routes

GET /api/scripts : Retrieve all scripts
POST /api/scripts : Create a new script
GET /api/scripts:id : Retrieve a specific script by ID
PUT /api/scripts:id : Update a specific script by ID
DELETE /api/scripts:id : Delete a specific script by ID
These are authenticated routes and require a token

Authentication Routes

POST /api/users/register: Register a new user
POST /api/users/login: Login a user
GET /api/users/current: Retrieve the currently logged-in user (protected route)

Authentication

Authentication is required for the /current route and the script routes. The auth middleware is used to protect this route, ensuring that only authenticated users can access.

Usage

Install dependencies: npm install
Start the app: npm start
Access the app via a web browser or API client
Register a new user using the /register route
Login with the registered user using the /login route to obtain an authentication token
Include the authentication token in the request headers for protected routes, such as /current
Use the available routes to manage scripts, including creating, retrieving, updating, and deleting scripts

script-manager-backend's People

Contributors

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