Skip to content

apsdehal/lein-clj-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lein Clojure Service

Leiningen template for a clojure based HTTP service. Following libraries are preincluded:

Usage

To create a new service, add the following to your lein ~/.lein/profiles.clj

{:user {:plugins [[clj-service/lein-template "LATEST"]]}}

After this you can create the service with:

lein new clj-service <project-name>

This will prompt for base path and port number of the service. Base path is where you main code will lie. For e.g passing com/sdslabs with name lens will create all code in src/com/sdslabs/lens.

Example:

lein new clj-service lens

Every service should have a unique port locally so that you can run more than one service locally.

Service

Your service consists of three functions:

initialize!: Sets up the global state.

Handler function: Takes the request

destroy: Destroys global state.

License

Distributed under the Apache License, Version 2.0

About

Lein template for a clojure service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published