madhusudhan1234 /
node-api-ts
Learning Node Js API using Typescript, Express, Postgres etc. This is a bookie app
27/100 healthLoading repository data…
sadhakbj / repository
Bookie is a Node.js application built with TypeScript, Docker, TypeORM, and class-validator. It is a REST API that allows users to list, view details, comment on, and rate books based on their read history. This repository contains the source code and documentation for the project. Contributions and feedback are welcome!
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Bookie is a secured RESTful API that allows users to view and manage books, authors, and their information. The app is built with NodeJS, TypeScript, MySQL, TypeORM, Class Validator, and JWT. It provides CRUD functionality for books and authors, and users can register and log in to access the protected routes.
https://github.com/sadhakbj/Bookie-NodeJs-Typescript bookie-tscd bookie-ts.env.example file to .env and update the necessary variables: cp .env.example .envyarn install or yarnyarn migrateyarn devhttp://localhost:3000 or the port you specified in .envTo run Bookie via Docker, set the DB_HOST environment variable to "mysql" in the .env file. Then run the following command:
docker compose up --build
his will build and run the Docker container for the app and the MySQL database. You can then access the app at http://localhost:3000.
Make sure that you have Docker installed on your machine before running this command. You can download Docker here.
typeorm: Runs the TypeORM CLI with the data-source.ts file.migration:show: Shows all the executed migrations.migration:create: Creates a new migration. You need to provide a name for the migration. Example: yarn migration:create create_users_table.migration:run: Runs all pending migrations.migration:revert: Reverts the last executed migration.To create a new migration, run the following command:
yarn migration:create <migration-name> for example: yarn migration:create create_users_table
This will create a new migration file in the
src/database/migrationsdirectory.
You can then edit the migration file and define the necessary schema changes.
To revert the last executed migration, run the following command: yarn migration:revert
GET /books: Get all booksGET /books/:id: Get a book by IDPOST /books: Create a new book (requires authentication)PUT /books/:id: Update a book by ID (requires authentication)DELETE /books/:id: Delete a book by ID (requires authentication)GET /authors: Get all authorsGET /authors/:id: Get an author by IDPOST /authors: Create a new author (requires authentication)PUT /authors/:id: Update an author by ID (requires authentication)DELETE /authors/:id: Delete an author by ID (requires authentication)POST /auth/register: Register a new userPOST /auth/login: Login and get an access tokenThis project is licensed under the MIT License. See the LICENSE file for details.
Selected from shared topics, language and repository description—not editorial ratings.
madhusudhan1234 /
Learning Node Js API using Typescript, Express, Postgres etc. This is a bookie app
27/100 health