-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathREADME.md.old
More file actions
80 lines (59 loc) · 1.46 KB
/
README.md.old
File metadata and controls
80 lines (59 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Weaver Backend
Backend service for Weaver - A reputation score platform for Starknet users and projects.
## Prerequisites
- Node.js (v16 or higher)
- MongoDB
- npm or yarn
## Setup
1. Clone the repository
```
git clone [your-repo-link]
cd weaver-backend
```
2. Install dependencies
```
npm install
```
3. Environment Setup
Create a `.env` file in the root directory with the following variables:
```
PORT=3000
MONGO_URI=mongodb://localhost:27017/weaver
```
## Running the Application
Development mode:
` npm run dev
`
Production mode:
` npm start
`
## API Endpoints
### Users
- POST /api/register - Register a new user
```
{
"address": "0x...",
"username": "user123"
}
```
- GET /api/users - Get all users
## Project Structure
weaver-backend/
├── src/
│ ├── config/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ └── app.js
├── .env
├── .gitignore
└── package.json
## Available Scripts
- `npm start` - Run the server
- `npm run dev` - Run the server with nodemon (development mode)
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request