A system where user will register and login and create sites, and respective logs of those actions will be shown
This is a part of a MERN stack project written in Express with MongoDB, where a user can register, login, create/edit/delete sites and view their logs. Mongoose ODM is also used
Frontend Implementation in this repository : https://github.com/Zishan3165/audit-log-app
- Clone the repository
git clone https://github.com/Zishan3165/audit-log-app-backend.git
- Navigate to the project directory
cd audit-log-app-backend
- Install dependencies
npm install
- Start the development server
npm start
- The server will start on
http://localhost:5000
by default.
-
POST /users/login
- Login -
POST /users/signup
- Signup -
GET /users
- Get all users -
GET /api/users/:id
- Get user by ID -
DELETE /api/users/:id
- Delete user by ID -
POST /sites
- Create a site -
GET /sites
- Get all sites -
PUT /sites/:id
- Replace existing site -
GET /sites/:id
- Get site by ID -
DELETE /sites/:id
- Delete site by ID -
POST /logs
- Post a log -
GET /logs
- Get all logs -
GET /logs/:id
- Get log by ID
Create a .env
file in the root directory and add the following:
PORT=5000
AUDIT_SYSTEM_DATABASE_URI=your-mongodb-database-uri
- Convert to typescript
- Add more tests