- Node.js
- npm
-
Clone the repository:
git clone https://github.com/ssacharya2002/Google-Form-Windows-Desktop-App-Backend cd Google-Form-Windows-Desktop-App-Backend
-
Install dependencies::
npm install
- Database File Setup:
The
db.json
file will be automatically created in the dist directory when you run the application for the first time. This file is used to store submissions data.
- Build the TypeScript files:
npm run start
- Accessing the API:
Once the server is running, you can access the API endpoints at http://localhost:3000:
-
GET /ping: Checks if the server is running.
-
POST /submit: Submits data to the database (db.json).
-
GET /read?index={index}: Retrieves a submission by index from the database.
-
DELETE /delete?index={index}: Deletes a submission from the database.
-
PUT /edit?index={index}: Updates a submission in the database.
-
GET /search?email={email}: Searches for a submission by email in the database.