1.6 KiB
Quickstart: Simple HTTP Auth
This document provides a quick guide to setting up and testing the Simple HTTP Auth feature.
Prerequisites
- Node.js (LTS)
- npm (usually comes with Node.js)
- Docker and Docker Compose (for running the full application stack)
Setup
-
Clone the repository:
git clone <repository_url> cd unisono -
Create a
.envfile in thebackend/directory:cd backend touch .envAdd the following line to
backend/.env, replacingYOUR_PASSPHRASE_HEREwith your desired secret passphrase:AUTH_PASSPHRASE=YOUR_PASSPHRASE_HERENote: If
AUTH_PASSPHRASEis missing or empty, the application will start without authentication. -
Build and run the application using Docker Compose:
cd ../.. # Go back to the project root if you are in backend/ docker-compose up --buildThis will build the frontend and backend services and start them.
Usage
-
Access the application: Open your web browser and navigate to
http://localhost:80. -
Enter the passphrase: You will be presented with a screen prompting you to enter the passphrase. Enter the passphrase you configured in
backend/.env. -
Access the SPA: Upon successful authentication, you will gain access to the Single Page Application. Your access will be preserved for the duration of your browser session.
Testing
To run the tests for the backend and frontend:
# For backend tests
cd backend
npm test
# For frontend tests
cd frontend
npm test