Skip to content

Commit

Permalink
Updates the documentation to install and run the project
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGuardado committed Oct 3, 2020
1 parent 7f28c48 commit 9781a9e
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,60 @@ Monitoring service for endpoints. A small tool by [@adrianmg](https://twitter.co
[![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)

### Server instructions
1/ Ensure that all service backends are up and running. You can do this easily using Docker.
```sh
docker-compose up
```
npm install
npm run start

2/ Install node dependencies.
```sh
npm i
```

3/ Now you can run the API service
```sh
dotenv npm run start
```

4/ Open the local url:
```sh
http://localhost:3001/{username}/endpoints
```

#### Creating data
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/`.

1/ Create a new database with the name: `endpoint`

2/ Create a collection named `endpoints`.

3/ Now you can add a new endpoint to get monitorized.
```
{
_id: "40004fdf-8dbb-478b-8613-9a9ceba22a9f",
userId: 'username',
name: 'Personal Website',
url: 'yourpersonalwebsite.com'
}
```

### Client instructions
1/ Go to the `app` directory.
```sh
cd app
```

2/ Install node dependencies.
```sh
npm i
```
npm install

3/ Run the application server.
```sh
npm run dev
```

4/ Go to the web application.
```
http://localhost:3000/user/{username}
```

0 comments on commit 9781a9e

Please sign in to comment.