File tree 4 files changed +67
-6
lines changed
4 files changed +67
-6
lines changed Original file line number Diff line number Diff line change 1
1
# auth-api
2
2
3
- This part of the exercise is responsible for authentication.
3
+ This part of the exercise is responsible for authentication. It is written in Go and tested with Go1.9.
4
+
4
5
It provides a single useful API endpoint ` POST /login ` that takes a simple JSON object and
5
6
returns an access token in case of successful authentication.
6
7
@@ -17,11 +18,19 @@ The JSON object structure is following:
17
18
18
19
## Configuration
19
20
20
- The binary scans environment for variables:
21
- - ` AUTH_API_PORT ` - the port the service takes .
21
+ The service scans environment for variables:
22
+ - ` AUTH_API_PORT ` - the port the service takes.
22
23
- ` USERS_API_ADDRESS ` - base URL of [ Users API] ( /users-api ) .
23
24
- ` JWT_SECRET ` - secret value for JWT generator. Must be shared amongst all components.
24
25
26
+ Following users are hardcoded for you:
27
+
28
+ || Username | Password ||
29
+ | -----------------------|
30
+ | admin | admin |
31
+ | johnd | foo |
32
+ | janed | ddd |
33
+
25
34
## Building and running
26
35
27
36
1 . Update the dependencies
@@ -34,7 +43,6 @@ go build
34
43
AUTH_API_PORT=8000 USERS_API_ADDRESS=http://users-api:8082 JWT_SECRET=foo ./auth-api
35
44
```
36
45
37
- {"username": "admin","password": "admin"}
38
46
## Usage
39
47
40
48
```
Original file line number Diff line number Diff line change 1
1
# frontend
2
2
3
- > UI for sample distributed TODO app
3
+ UI for sample distributed TODO app build with VueJS
4
4
5
- ## Build Setup
5
+ ## Configuration
6
+ - ` PORT ` - a port the application binds to
7
+
8
+ ## Building and running
6
9
7
10
``` bash
8
11
# install dependencies
Original file line number Diff line number Diff line change
1
+ # todos-api
2
+
3
+ This service is written in NodeJS, it provides CRUD operations over TODO entries.
4
+ It keeps all the data in memory. Following API endpoints are exposed:
5
+
6
+ - ` GET /todos?userId=id ` - list all TODOs for a given user
7
+ - ` POST /todos ` - create new TODO
8
+ - ` GET /todos/:taskId ` - get a TODO by ID
9
+ - ` PUT /todos/:taskId ` - modify a TODO by ID
10
+ - ` DELETE /todos/:taskId ` - modify a TODO by ID
11
+
12
+ TODO object looks like this:
13
+ ```
14
+ {
15
+ id: 1,
16
+ userId: 1,
17
+ content: "Create new todo"
18
+ }
19
+ ```
20
+
21
+ ## Configuration
22
+
23
+ The service scans environment for variables:
24
+ - ` TODO_API_PORT ` - the port the service takes.
25
+ - ` JWT_SECRET ` - secret value for JWT token processing.
26
+
27
+ ## Building and running
28
+
29
+ ```
30
+ npm install
31
+ JWT_SECRET=foo TODO_API_PORT=8082 npm start
32
+ ```
Original file line number Diff line number Diff line change
1
+ # users-api
2
+ This service is written in Java with SpringBoot. It provides simple API to retrieve user data.
3
+
4
+ - ` GET /users ` - list all users
5
+ - ` GET /users/:username ` - get a user by name
6
+
7
+ ## Configuration
8
+
9
+ The service scans environment for variables:
10
+ - ` JWT_SECRET ` - secret value for JWT token processing.
11
+ - ` SERVER_PORT ` - the port the service takes.
12
+
13
+ ## Building and running
14
+
15
+ ```
16
+ ./mvnw clean install
17
+ JWT_SECRET=foo SERVER_PORT=8083 java -jar target/users-api-0.0.1-SNAPSHOT.jar
18
+ ```
You can’t perform that action at this time.
0 commit comments