-
Clone the repository:
git clone https://github.com/munene-m/Auth-server
-
Navigate to the project location
cd scanwize_task
-
Install dependencies
npm install
-
Set up environment variables
To configure the application correctly, ensure the following environment variables are set. If they are not already defined, you can set in a
.env
file at the root of the project.-
JWT_SECRET:
- This variable should contain the secret key used for JSON Web Token (JWT) encryption.
-
ADMIN_EMAIL:
- Provide the email address associated with the administrator account.
-
DATABASE_URL:
- Set the value to the connection string for your local PostgreSQL database.
- Example:
postgresql://username:password@localhost:5432/your_database_name
Replaceusername
,password
, andyour_database_name
with your PostgreSQL credentials and database name.
Ensure that these variables are appropriately configured to enable the application to run smoothly.
-
-
Navigate to src directory
cd src
-
Run database migration
npx sequelize-cli db:migrate
-
Navigate back to the root of the project
cd ..
-
Start the server
npm run start
-
Access the API documentation:
After starting the server, you can access the API documentation using the following link:
(http://localhost:3000/api-docs)
Open the link in your web browser to explore and interact with the available endpoints, request examples, and responses.
Note: Make sure the server is running (
npm run start
) before accessing the API documentation.
-
Notifications
You must be signed in to change notification settings - Fork 0
munene-m/Auth-server
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Role based authentication and authorization system
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published