Consuming APIs from Clojure
When getting results from API calls, its very common to receive data in JavaScript Object Notation (JSON).
Once we have the JSON data, it is converted to a Clojure data structure to use the hundreds of functions in clojure.core that can readily transform the shape of that data.
We can process this with the clojure.data.json library and community projects including cheshire and transit.
Continue reading →Clojure Webapp routing and APIs with JSON
Defining routes for a Clojure webapps is easy with the Compojure library and we can also serve JSON to create a simple API. All this is built on the Clojure webserver we built in the previous article.
Compojure has a defroutes
macro that provides a simple way to define routes and there are other convienience functions that make routing very straight forward.
We can also add transit and other libraries to help manage JSON.
Continue reading →Clojure web server from scratch with deps.edn
Discover how to build a Clojure web server from the ground up using Clojure CLI tools to create and run the project and deps.edn
to manage the dependencies.
Update: Practicalli Clojure WebApps has newer versions of this guide. Take a look at the Status Monitor and Banking on Clojure projects
Continue reading →This project will be used to build a web server that will serve our API, which we will build in future posts and study group broadcasts.
Streamline Contributions with GitHub Pull Request Templates
Pull requests are very valuable to project maintainers, especially if they follow guidelines for the project. Using a pull request template allows project maintainers to define the most effective way to contribute right inside the contribution projects.
Project maintainers, especially on very active projects, rarely have time to spend on triage of pull requests. Generally the simpler a pull request the easier it is for a maintainer to review it and accept it.
Previously we created GitHub issue templates, for which their can be many. one pull request template as all pull requests are the same type.
Continue reading →Improving communication with GitHub issue templates
Create templates for issues and pull requests can greatly improve feedback and contributions, especially as an open source project maintainer. We will look specifically at issue templates.
Templates can ask people to provide specific information, or request use of a tool for generating system information (e.g. Spacemacs). Automatic assignment and labelling saves time on issue triage by the project maintainers.
Templates can be created for most shared Git repository services, i.e GitHub, GitLab, BitBucket, etc.
Continue reading →