Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.env
.eslintcache
node_modules
yarn.lock
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.angular
.husky
.vscode
coverage
dist
node_modules
2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trailingComma: es5
singleQuote: true
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cSpell.words": [
"fusionauth",
"nocache"
]
}
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ If you opt for hosting your own server, this repository will serve as an example
To get started, follow these steps:

1. From the root directory, run `npm install`.
2. Run `npm run start`.
2. Rename the `.env.example` file to `.env` and update the values with your FusionAuth details.
3. Run `npm run start`.

You should observe the console output `FusionAuth example server listening on port 9000`.
You should observe the console output `🚀 Server running on port 9000`.

## Server code requirements

Expand Down Expand Up @@ -113,3 +114,17 @@ This library may periodically receive updates with bug fixes, security patches,
These releases may also update dependencies, language engines, and operating systems, as we\'ll follow the deprecation and sunsetting policies of the underlying technologies that the libraries use.

This means that after a dependency (e.g. language, framework, or operating system) is deprecated by its maintainer, this library will also be deprecated by us, and may eventually be updated to use a newer version.

# Change Log

### 2.0.0

#### Breaking Changes

- Modified routes to match FusionAuth API changes in 1.45.0.

#### Enhancements

- Change config.js to use environment variables
- Automatically restart the dev server when changes are detected
- Added linting and formatting along with enforcement via pre-commit hook
9 changes: 0 additions & 9 deletions config.js

This file was deleted.

26 changes: 0 additions & 26 deletions cookie.js

This file was deleted.

12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';

export default [
{ files: ['src/**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
];
5 changes: 5 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AUTH_BASE_URL="http://localhost:9011"
AUTH_CLIENT_ID=""
AUTH_CLIENT_SECRET=""

PORT=9000
45 changes: 0 additions & 45 deletions fusionAuthClient.js

This file was deleted.

50 changes: 0 additions & 50 deletions index.js

This file was deleted.

Loading