Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jewel109/user-management

An API server for user management
https://github.com/jewel109/user-management

Last synced: 2 days ago
JSON representation

An API server for user management

Awesome Lists containing this project

README

        

An API server having uniform success and failure structure as well as CI/CD practice .

# Installation

Node version `v22.4.1`

Clone this repo running
`git clone https://github.com/jewel109/user-management.git `

`cd` to `` dir and run `pnpm install`

# Run the project

Make an `.env` file and copy the content from `.env.example` file later give value in `PORT` in `.env`.
You are now `` dir.

Run the database by running `docker compose up --build`
Now run `pnpm run start:dev` to run the server.
You can see other available command in `package.json` file.
Your server is running now on the port *3232*.
Now run the tests by `pnpm test`
Now lint by `pnpm lint` and format by `pnpm format`

# End point

You can see the list of user by running `curl http://localhost:3232/user/users`

And you can add user to our server by running

```shell
curl -X POST http://localhost:3232/user/addUser \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "[email protected]"
}'
```