Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
github.com/Mubinabd/restaurant_api-gateway
Project Description: Restoran bron qilish uchun qulaylashtirilgan, keng imkoniyatlarga ega kichkina API service. Ushbu tizim orqali foydalanuvchilar restoran stollarini bron qilishlari, ovqatlarni tanlashlari, to'lov qilishlari va restoran ma'muriyati esa bronlarni boshqarishi mumkin bo'ladi.
Initialize a git repository and clone the project:
git init
git clone git@github.com:Mubinabd/reservation_service.git
Create a database named restaurant
on port 5432
.
Update the .env
file with the appropriate configuration.
DB_HOST=localhost
DB_USER=postgres
DB_NAME=restaurant
DB_PASSWORD=pass
DB_PORT=5432
LOGPATH=logs/info.log
Use the following Makefile commands to manage the database migrations and set up the project:
# Set the database URL
exp:
export DBURL="postgres://postgres:1234@localhost:5432/restaurant?sslmode=disable'"
# Run migrations
mig-up:
migrate -path migrations -database ${DBURL} -verbose up
# Rollback migrations
mig-down:
migrate -path migrations -database ${DBURL} -verbose down
# Create a new migration
mig-create:
migrate create -ext sql -dir migrations -seq create_table
# Create an insert migration
mig-insert:
migrate create -ext sql -dir migrations -seq insert_table
# Generate Swagger documentation
swag:
swag init -g api/api.go -o api/docs
# Clean up migrations (commented out by default)
# mig-delete:
# rm -r db/migrations
Set the environment variable and run the project:
make exp
make mig-up
go run main.go
Open the following URL to access the Swagger documentation:
http://localhost:8080/api/swagger/index.html#/
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.