Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev buppgard tuesday #8

Closed
wants to merge 5 commits into from
Closed

Dev buppgard tuesday #8

wants to merge 5 commits into from

Conversation

buppgard
Copy link
Collaborator

@buppgard buppgard commented Jul 2, 2024

No description provided.

buppgard added 5 commits July 2, 2024 11:35
Add user authentication with userController and routes

- Added userController.js to manage user-related operations
  - Implemented login function to authenticate users
    - Validates username and password
    - Generates JWT token upon successful authentication
  - Includes error handling for invalid login attempts
- Created userRoutes.js to define user-related API endpoints
  - Added /api/login route for user login
- Configured Express app to use user routes in app.js
  - Added middleware for parsing JSON request bodies
  - Set up default route for testing server response
- Updated db.js to set up PostgreSQL connection using pg library

This commit implements the backend logic for user authentication, setting up necessary routes and controllers to handle user login and JWT token generation.
Restructured file system to add front and back end folders. Added a rudimentary front end to test user log in functionality.
Users can log in. If credentials match, a welcome message is displayed and they are given the option to log out.
@buppgard buppgard closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant