You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-17Lines changed: 12 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,16 @@
1
-
# Quickstart: Spring API Resource Server with FusionAuth
1
+
# Quickstart: Express.js API Resource Server with FusionAuth
2
2
3
-
This repository contains a SpringBoot application that works with a locally-running instance of [FusionAuth](https://fusionauth.io/), the authentication and authorization platform.
3
+
This repository contains an application that works with a locally-running instance of [FusionAuth](https://fusionauth.io/), the authentication and authorization platform.
4
4
5
5
## Setup
6
6
7
7
### Prerequisites
8
8
You will need the following things properly installed on your computer.
9
9
10
10
*[Git](http://git-scm.com/): Presumably you already have this on your machine if you are looking at this project locally; if not, use your platform's package manager to install git, and `git clone` this repo.
11
-
*[Java](https://www.oracle.com/java/technologies/downloads/): Java can be installed via a variety of methods
12
-
*`mvn`: Maven, a java package manager. Install it by [following the instructions here](https://maven.apache.org/install.html).
11
+
*[node](https://nodejs.org/en/download) version 18 or later.
13
12
*[Docker](https://www.docker.com): For standing up FusionAuth from within a Docker container. (You can [install it other ways](https://fusionauth.io/docs/v1/tech/installation-guide/), but for this example we will assume you are using Docker.)
14
13
15
-
This app was built using Java 17 and the maven wrapper. If you wish to use a different version of Java you will need to update the `java.version` in the [pom file](./complete-application/pom.xml).
16
-
17
-
18
14
### FusionAuth Installation via Docker
19
15
20
16
The root of this project directory (next to this README) are two files [a Docker compose file](./docker-compose.yml) and an [environment variables configuration file](./.env). Assuming you have Docker installed on your machine, you can stand up FusionAuth up on your machine with:
@@ -37,21 +33,20 @@ FusionAuth will be initially configured with these settings:
37
33
38
34
You can log into the [FusionAuth admin UI](http://localhost:9011/admin) and look around if you want, but with Docker/Kickstart you don't need to.
39
35
40
-
### Spring API complete-application
36
+
### complete-application
41
37
42
-
The `complete-application` directory contains a minimal SpringBoot app configured to authenticate with locally running FusionAuth.
38
+
The `complete-application` directory contains a minimal app configured to authenticate with locally running FusionAuth.
43
39
44
-
Install the dependencies via the Maven wrapper and run the app server with:
40
+
Install the dependencies and run the app with
45
41
```
46
42
cd complete-application
47
-
./mvnw package
48
-
./mvnw spring-boot:run
43
+
npm install
44
+
npm run start
49
45
```
50
-
Note: If you are on Windows swap `./mvnw` with `.\mvnw.cmd`
51
46
52
-
SpringBoot is now serving two api endpoints
53
-
-[http://localhost:8080/make-change](http://localhost:8080/make-change) - this endpoint calculates the change to make from a given total
54
-
-[http://localhost:8080/panic](http://localhost:8080/panic) - this endpoint simulates notifying the police of an incident.
47
+
The app is now serving two api endpoints
48
+
-[http://localhost:3000/make-change](http://localhost:3000/make-change) - this endpoint calculates the change to make from a given total
49
+
-[http://localhost:3000/panic](http://localhost:3000/panic) - this endpoint simulates notifying the police of an incident.
55
50
56
51
You can login with a user preconfigured during Kickstart, `teller@example.com` with the password of `password` and `applicationId` by calling:
0 commit comments