Skip to content

Commit d30caf8

Browse files
committed
Import user-service
1 parent c55594a commit d30caf8

30 files changed

+2755
-0
lines changed

user-service/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/node_modules
2+
**/.env
3+
**/.idea

user-service/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# CS3219 project: PeerPrep
2+
3+
## User Service
4+
5+
### Quick Start
6+
7+
1. In the `user-service` directory, create a copy of the `.env.sample` file and name it `.env`.
8+
2. Create a MongoDB Atlas Cluster and obtain the connection string.
9+
3. Add the connection string to the `.env` file under the variable `DB_CLOUD_URI`.
10+
4. Ensure you are in the `user-service` directory, then install project dependencies with `npm install`.
11+
5. Start the User Service with `npm start` or `npm run dev`.
12+
6. If the server starts successfully, you will see a "User service server listening on ..." message.
13+
14+
### Complete User Service Guide: [User Service Guide](./user-service/README.md)

user-service/src/.env.sample

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
DB_CLOUD_URI=<CONNECTION_STRING>
2+
DB_LOCAL_URI=mongodb://127.0.0.1:27017/peerprepUserServiceDB
3+
PORT=3001
4+
5+
# Will use cloud MongoDB Atlas database
6+
ENV=PROD
7+
8+
# Secret for creating JWT signature
9+
JWT_SECRET=you-can-replace-this-with-your-own-secret
135 KB
Loading
53.5 KB
Loading
119 KB
Loading
51 KB
Loading
104 KB
Loading
58.2 KB
Loading
402 KB
Loading

0 commit comments

Comments
 (0)