User management API, posts and interactions made on the social network Labook. It is an express server back-end application with SQLite3 database, where there is data protection and code organization based on layered architecture concepts. It aims to promote connection and interaction between people. Those who register in the application will be able to create and like publications.
https://dbdiagram.io/d/63d16443296d97641d7c1ae1
https://documenter.getpostman.com/view/24460805/2s93CRJWGq
- Clone the repository.
- In NPM package manager run:
npm i
- Create your own file
file-name.db
on folderdatabase
. - Open the file
labook.sql
and run the table creation commands. - Create a file called
.env
in the root of the project to place these environment variables.
#Express Port
PORT=3003
#SQLite database file path
DB_FILE_PATH=./src/database/file-name.db
#Credentials and secret keys
JWT_KEY=chose-a-secret-key
#Token expiration time (exemple: 1 day)
JWT_EXPIRES_IN=1d
- Run the server.
npm run dev
- Login
USERS
- GET All Users;
- POST Create User;
- DEL Delete User;
POSTS
- GET All Posts;
- POST Create Post;
- PUT Edit Post;
- DEL Delete Post;
- PUT Like or Dislike.
- NodeJS;
- Typescript;
- Express;
- SQLite;
- Knex;
- POO;
- Layered Architecture;
- UUID;
- Hashing Passwords;
- Tokens JWT;
- Authentication and Authorization;
- Routing;
- Postman.
Laís Rodrigues Macedo
📧 [email protected]
📞 (+49) 174 7781517