
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
github.com/lordOfNightmares/go-Testing
k
Golang REST API sample with MariaDB integration using Gin and GORM. (This project IS NOT a starter kit, it is just an example project.)
This project is a sample project that contains following features:
$ dep ensure
$ go get github.com/jinzhu/gorm
$ go get github.com/codegangsta/gin
GORM should be installed via go get
since installation via dep
is imperfect (it does not download dialects directory).
codegangsta/gin is an optional package to install if you want to make usage of live reloading feature of server (just like nodemon in Node.js environment).
This project uses MariaDB to store data. Install MariaDB and create a sample database and a user account.
CREATE DATABASE sample;
GRANT ALL PRIVILEGES ON sample.* to sample@'%' IDENTIFIED BY 'samplepass';
GRANT ALL PRIVILEGES ON sample.* to sample@'localhost' IDENTIFIED BY 'samplepass';
Open .env file and edit the values if you need to. This project uses godotenv to read and use .env file.
Database config string is formatted in go-sql-driver format.
$ go run main.go
To explicitly compile the code before you run the server:
$ go build main.go
$ ./main
To use live-reloading in development environment,
$ ./scripts/start-dev
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
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.