Installation
This software is built with Go programming language. It means you will get an executable binary to run on your machine. You don’t need extra software like MAMP, XAMPP, or WAMP to run Tania, but you may need MySQL database if you choose to use it instead of SQLite (the default database.)
The easiest way to install Tania is using pre-built binaries for Windows (x64) and Linux (x64). You can download it from the release page. After the download process is finished, you can unzip it, and run it from Windows Command Prompt/Powershell by using .\tania-core.exe or from Linux terminal by using ./tania-core.
If your OS is neither Windows (x64) nor Linux (x64), then you must build Tania by yourself. You can follow this instruction below.
Prerequisites
Building Instructions
Assume that your Go environment is in ~/go.
- Make sure you have installed
golang/dep - Clone the repo using
go get github.com/Tanibox/tania-core - Checkout the stable version by using
cd ~/go/src/github.com/Tanibox/tania-core && git checkout tags/1.5.1 -b v1.5.1 - From the project root, call
dep ensureto install the Go dependencies- If you have an issue with
dep ensure, you can callgo getinstead.
- If you have an issue with
- Create a new file
conf.jsonusing the values from theconf.json.exampleand set it with your own values. - Issue
npm installto install VueJS dependencies. - To build the VueJS, just run
npm run devfor development purpose ornpm run prodfor production purpose. - Setup SQLite:
- Edit
SqlitePathinconf.jsonto your sqlite DB file path (ex: /Users/user/Programs/sqlite/tania.db) - Create an empty file with the exact filename and path that match the
SqlitePathconfig.
- Edit
- Compile the source code with
go build. It will producestania-core.exe(on Windows) ortania-core(on Linux and OSX.) - Run the program from Terminal by issuing
./tania-core, or from Windows Command Prompt by issuing.\tania-core.exe. - The default username and password are
tania / tania.
Database Engine
Tania uses SQLite as the default database engine. You may use MySQL as your database engine by replacing sqlite with mysql at tania_persistence_engine field in your conf.json.
{
"tania_persistence_engine": "sqlite",
"demo_mode": true,
"upload_path_area": "uploads/areas",
"upload_path_crop": "uploads/crops",
"sqlite_path": "db/sqlite/tania.db",
"mysql_host": "127.0.0.1",
"mysql_port": "3306",
"mysql_dbname": "tania",
"mysql_user": "root",
"mysql_password": "root",
"redirect_uri": "http://localhost:8080/",
"client_id": "f0ece679-3f53-463e-b624-73e83049d6ac"
}
Run The Test
- Use
go test ./...to run all the Go tests. - Use
npm run cypress:runto run the end-to-end test