github.com/hellofresh/janus@v0.0.0-20230925145208-ce8de8183c67/docs/quick_start/file_system.md (about) 1 # Adding your API - File System 2 3 By choosing a File System based configuration we have a static way of configure Janus (similar to nginx). 4 5 ## 1. Boot it up 6 7 We highly recommend you to use one of our examples to start. Let's see the [front-proxy](/examples/front-proxy) example: 8 9 Make sure you have docker up and running on your platform and then run. 10 11 ```sh 12 docker-compose up -d 13 ``` 14 15 This will spin up a janus server and will have a small proxy configuration that is going to a mock server that we spun up. 16 17 ## 2. Verify that Janus is working 18 19 Issue the following cURL request to verify that Janus is properly forwarding 20 requests to your API. Note that [by default][proxy-port] Janus handles proxy 21 requests on port `:8080`: 22 23 If you access `http://localhost:8080/example` you should something like: 24 25 ```json 26 { 27 "message": "Hello World!" 28 } 29 ``` 30 31 A successful response means Janus is now forwarding requests made to 32 `http://localhost:8080` to the elected upstream target (chosen by the load balancer) we configured in step #1, 33 and is forwarding the response back to us. 34 35 ## Understanding the directory structure 36 37 By default all apis configurations are splitted in separated files (both single and multiple api definitions per file are supported) and they are stored in `/etc/janus`. You can change that path by simply defining the configuration `database.dsn`, for instance, you can define the value to `file:///usr/local/janus`. 38 39 There are two required folder that needs to be there: 40 41 - `/etc/janus/apis` - Holds all API definitions 42 - `/etc/janus/auth` - Holds all your Auth servers configurations 43 44 ## 4. Adding a new endpoint and authentication 45 46 To add a new endpoint or authentication you can see the [Add Endpoint tutorial](add_endpoint.md) but instead of using the admin API you'll add your configuration to a file and reload the docker instance: 47 48 ```sh 49 docker-compose reload janus 50 ```