Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/xhfmvls/restaurant-api
Restaurant API created with GO
This API is a prototype (and implementation) of REST API for Restaurants created with Golang. The models of entities here are created based on the most simple data model that could be implemented. As this API is just a prototype, there are still many points that could be developed such as the data model, responded data structure, and performance. But I believe that this API prototype has covered all fundamentals of developing/building an API with Golang (with Gorilla/Mux and GORM).
To test the API, you may open this Postman documentation and explore all the test examples of each request.
Understanding GO Fundamentals
Tutorials Playlist
Learn Gorilla/Mux and GORM
Gorilla/Mux Documentation
GORM Documentation
Familiarize with MySQL
Documentation
Understanding REST API Concepts
Explanation
RESTful APIs in 100 Seconds
Familiarize with Postman Documentation
Postman Documentation Tutorial
.env
file with credentials needed.# Port of the Server
PORT=<PORT>
# Database Information
DB_URL=<DB_URL>
# JWT Information
JWT_KEY=<JWT_KEY>
# Login to MySQL User
# You may use root as the user
mysql -u <MySQL User> -p
# Enter password on given prompt
Password: <MySQL Password>
# Create Database
CREATE DATABSE <MySQL Database Name>;
Create Free MySQL Database Online
# Install all modules used in the project
go get ./...
go run .\main.go
go build .\main.go
.\main.exe
Published Restaurant API Documentation
Json of API Documentation
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.