This example shows how to use Anychart library with the Clojure programming language and MySQL database.
To use this sample you must have JAVA installed, as described at JAVA installation page; MySQL installed and running, if not please check out MySQL download page and follow these instructions; and Leiningen.
To check your installations, run the following command in the command line:
$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) # sample output
$ lein -v
Leiningen 2.7.1 on Java 1.8.0_181 Java HotSpot(TM) 64-Bit Server VM # sample output
$ mysql --version
mysql Ver 14.14 Distrib 5.5.52, for debian-linux-gnu (x86_64) using readline 6. # sample outputTo start this example run commands listed below.
Clone the repository from github.com:
$ git clone [email protected]:anychart-integrations/clojure-mysql-template.gitNavigate to the repository folder:
$ cd clojure-mysql-templateBuild project:
$ lein uberjarSet up MySQL database, use -u -p flags to provide username and password:
$ mysql < database_backup.sqlRun example:
$ java -jar target/clojure-mysql-template.jarOpen browser at http://localhost:8080/
Your workspace should look like:
clojure-mysql-template/
resources/
public/
css/
style.css # css style
src/
clojure_mysql_teamplte
core.clj # main code
database_backup.sql # MySQL database dump
README.md
LICENSE
...Language - Clojure
Build tool - Leiningen
Database - MySQL
© AnyChart.com - JavaScript charts. Released under the Apache 2.0 License.
