/json-db-backend

Primary LanguageTypeScriptMIT LicenseMIT

Express Server for Form Submissions

This Repositry contains an server written in Typescript using Express.js to handle form submissions.

Setup

To run this server locally make sure to follow these steps :

Note : Make sure to clear the 'db.json' before you run the server initially :)

1 . Clone the repositry:

  git clone https://github.com/lgsurith/json-db-backend.git
  cd json-db-backend
  1. Installing the Dependencies :
   npm install
   pnpm install
  1. To Start the Server :
  npm start
  pnpm start

As indicated in the port , it will start at 'https://localhost:3000'.

API Endpoints

  • GET /ping

    Checks if the server is running and the port connection is established. read

  • POST /submit

    Creates a new submission as per the interface. submit

  • GET /read

    Retrieves a submission by quering in index. read

  • DELETE /submissions/:index

    Deletes a submission by index. delete

  • PUT /edit/:index

    Updates a submission by index. update

  • GET /search

    Searches for a submission by quering in your email. email