README.md 1.62 KB
Newer Older
Ján Števčík's avatar
readme  
Ján Števčík committed
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
# Node.js Server

This server provides API routes for gathering data reached form
public resources by web scrapers and API routes documentation.

## Installation

Use the package manager [npm](https://www.npmjs.com/) to 
install all necessary packages. All packages are in package.json.

```bash
npm install
```

## Run server locally

To run server you need to have installed [node](https://nodejs.dev/). 

Run command to run server:

```bash
node server.js
```
Successful running server will say: ``` Server is running on port: 7777 ```. 
You can change port in .env file.

## Documentation

You can find live documentation to api routes [here](http://studentapp.kpi.fei.tuke.sk:7777/)
or local documentation in ``` docs/index.html ```.

For update documentation run ```rm -rf docs && apidoc -i ./ -e node_modules -o ./docs``` 
from root of this project.

### Troubleshooting -  Documentation is not showing

1. check if you're running on TUKE network or have VPN

2. If server still does not respond documentation, 
   check school docker if container is running.
   
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## Deploy

To deploy a server to TUKE docker you need be on TUKE network or use VPN. Go to
[portnaiter containers](https://studentapp.kpi.fei.tuke.sk/#/containers) and find right container.
It's named schedular and is published on port 7777. Open detail of container and hit
recreate. Hit ``` Pull lastest image ```and click ```Recreate``` button.

Ján Števčík's avatar
readme    
Ján Števčík committed
54
Congrats. Now changes are published!
Ján Števčík's avatar
readme  
Ján Števčík committed
55
56
57
58


## License
TUKE