https://github.com/shivamarora1/clojure-crud-hugsql
Clojure Rest api using Pedestal and HugSQL
https://github.com/shivamarora1/clojure-crud-hugsql
clojure hugsql pedestal postgresql ring
Last synced: 2 months ago
JSON representation
Clojure Rest api using Pedestal and HugSQL
- Host: GitHub
- URL: https://github.com/shivamarora1/clojure-crud-hugsql
- Owner: shivamarora1
- Created: 2022-05-27T16:19:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-08T09:40:21.000Z (about 4 years ago)
- Last Synced: 2025-12-26T06:47:54.665Z (6 months ago)
- Topics: clojure, hugsql, pedestal, postgresql, ring
- Language: Clojure
- Homepage:
- Size: 2.02 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pedestal-hug-sql
The project shows how we can make a rest api web service using Pedestal framework and Hug Sql.
Currently this project has only two working endpoints.
1. `/artists` : To get information about all the artists available in the table.
2. `/artists/:artist-id` : To fetch the information of a particular artist.
## How to run this project:
1. Make `.env` file in the root directory.
```
DATABASE_SUB_NAME="//{{SQL_DATABASE_CURL}}:5432/{{SQL_DATABASE_NAME}}"
DATABASE_USER_NAME="{{SQL_DATABASE_USERNAME}}"
DATABASE_PASSWORD="{{SQL_DATABASE_PASSWORD}}"
```
2. Start the application `lein run`.
## Things to figure out
1. Print exceptions neatly
2. Mocking/ testing