command
Version:
v0.0.0-...-5361bcd
Opens a new window with list of versions in this module.
Published: Aug 13, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Macaron + sqlx
This is an example of using Macaron and sqlx to achieve CRUD tasks for songs.
Install and run:
$ go get github.com/go-macaron/examples/sqlx
$ cd github.com/go-macaron/examples/sqlx
$ make
-
Create a song:
curl --data "title=Shake It Off&artist=Taylor Swift&year=2014" http://localhost:4000/songs
-
Get all songs:
curl http://localhost:4000/songs
-
Get a song:
curl http://localhost:4000/songs/1
-
Edit a song:
curl --request PATCH --data "title=Shake It Off2&artist=Taylor Swift&year=2014" http://localhost:4000/songs/1
-
Delete a song:
curl --request DELETE http://localhost:4000/songs/1
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.