This project implements a backend server using Express and TypeScript to manage form submissions. It provides endpoints for submitting, reading, updating, deleting submissions, and searching by email. Submissions are stored in a JSON file (db.json
) on the server.
-
GET /ping: Health check endpoint to confirm the server is running, returning { success: true }.
-
POST /submit: Accepts new form submissions with fields name, email, phone, github_link, and stopwatch_time. These submissions are stored in the db.json file.
-
GET /read?index=: Retrieves a specific submission based on its 0-indexed position.
-
DELETE /delete?index=: Deletes a submission by its index.
-
PUT /update/:index: Updates a submission at a specified index with
new values for name, email, phone, github_link, and stopwatch_time. -
GET /search?email=: Searches for a submission by email and
returns the submission object along with its index.
1. Open VsCode Terminal or Normal Terminal
2. Clone the project
git clone https://github.com/akkulsecond213/Slidely_ai_backend.git
3. Go to the project directory
cd Slidely_ai_backend
4. Install dependencies
npm install
5 . Start the server
npm run start
6. We can also use nodemon as it helps in automatically restarting the node application when file changes in the directory are detected.
npm run dev