Skip to content

About

This repository contains an application that works with a locally-running instance of FusionAuth, the authentication and authorization platform.

Resources

Security policy

Stars

2 stars

Watchers

8 watching

Forks

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

FusionAuth QuickStart: Express API

Warning

This repository is generated from content that lives at github.com/FusionAuth/fusionauth-site. Changes to files here will be overwritten by that automation. File an issue or pull request with fusionauth-site instead.

This repository contains a locally hosted FusionAuth instance and an Express API. For full instructions, see the FusionAuth Express API QuickStart.

Dependencies

  • Node.js 22 or later.
  • Docker 23 or later.

Start FusionAuth

  1. Navigate to the fusionauth directory.
  2. Start FusionAuth with Docker Compose:
    docker compose up -d
    
  3. Open http://localhost:9011/admin. Log in with admin@example.com and the password password.

Start the API

  1. Open a new terminal in the repository root.
  2. Navigate to complete-application and install the dependencies:
    cd complete-application
    npm install
    
  3. Start the API:
    node api.mjs
    

The API listens on port 3000. Send access tokens in the Authorization: Bearer <token> header. The free@example.com user can call GET /read. The premium@example.com user can call POST /write.

About

This repository contains an application that works with a locally-running instance of FusionAuth, the authentication and authorization platform.

Resources

Security policy

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages