Giter Site home page Giter Site logo

clojure_rest_api's Introduction

clojure-rest

Decided to learn clojure, create a rest web app, and use reactJS for the UI.

Prerequisites

You will need Leiningen 2.0.0 or above installed.

You will need Postgresql installed.

Setup Backend

Run CLI commands: createuser postgres or whatever your username you want.

createdb -U postgres -p 5432 -E UTF8 -O postgres clojure_test Replace postgres with user you created.

Note: tables will be created when lein starts up if your schema is not already created it will auto create it for you.

Running

To start a web server for the application, run:

lein ring server

TEST URL: http://localhost:3000/api/travis/test
;#=> what's up buddy!

API Call: http://localhost:3000/api/travis/
;#=> {:id "xues1-123sc2-fsasda3-2123s", :title "This is a title", :text "Im Back!"}

Creating Dummy data

CLIs

psql -U postgres -d clojure_test

insert into documents (id, title, text) VALUES ('xues1-123sc2-fsasda3-2123s','This is a title', 'Im Back!');

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.