Skip to content

Commit 9781a9e

Browse files
committed
Updates the documentation to install and run the project
1 parent 7f28c48 commit 9781a9e

File tree

1 file changed

+50
-3
lines changed

1 file changed

+50
-3
lines changed

README.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,60 @@ Monitoring service for endpoints. A small tool by [@adrianmg](https://twitter.co
44
[![Build Status](https://dev.azure.com/adrianmg-gh/adrianmg/_apis/build/status/adrianmg.status-server?branchName=master)](https://dev.azure.com/adrianmg-gh/adrianmg/_build/latest?definitionId=1&branchName=master)
55

66
### Server instructions
7+
1/ Ensure that all service backends are up and running. You can do this easily using Docker.
8+
```sh
9+
docker-compose up
710
```
8-
npm install
9-
npm run start
11+
12+
2/ Install node dependencies.
13+
```sh
14+
npm i
15+
```
16+
17+
3/ Now you can run the API service
18+
```sh
19+
dotenv npm run start
20+
```
21+
22+
4/ Open the local url:
23+
```sh
24+
http://localhost:3001/{username}/endpoints
25+
```
26+
27+
#### Creating data
28+
This step has not been automated yet, so you'll have to create the Mongo documents manually. If you're running `docker-compose` you can access to the Mongo Express web panel visiting `http://localhost:8081/`.
29+
30+
1/ Create a new database with the name: `endpoint`
31+
32+
2/ Create a collection named `endpoints`.
33+
34+
3/ Now you can add a new endpoint to get monitorized.
35+
```
36+
{
37+
_id: "40004fdf-8dbb-478b-8613-9a9ceba22a9f",
38+
userId: 'username',
39+
name: 'Personal Website',
40+
url: 'yourpersonalwebsite.com'
41+
}
1042
```
1143

1244
### Client instructions
45+
1/ Go to the `app` directory.
46+
```sh
47+
cd app
48+
```
49+
50+
2/ Install node dependencies.
51+
```sh
52+
npm i
1353
```
14-
npm install
54+
55+
3/ Run the application server.
56+
```sh
1557
npm run dev
1658
```
59+
60+
4/ Go to the web application.
61+
```
62+
http://localhost:3000/user/{username}
63+
```

0 commit comments

Comments
 (0)