A simple crud application in clojure built as a part of the London Clojure Dojo at uSwitch
- ring
- compojure
- org.clojure/java.jdbc
- org.postgresql/postgresql
The application tries to connect to a postgres db as defined in: src/clojure_crud/core.clj As of now, all it does is, fetch all rows from a table called "person" and display it at root route.
In order for this to work, create a table called "person" in the db and insert a couple records in it. For example:
CREATE TABLE person (first_name: TEXT, last_name: TEXT);
INSERT INTO person(first_name, last_name) values('john', 'doe');
Start the web server using the following command:
lein ring server
and it should open up a browser window for localhost:3000 where records from the "person" table should be visible
- Refactor the code
- Fix the hardcoded SQL query
- Add functionality to Create, Update and Delete