• Stars
    star
    602
  • Rank 74,389 (Top 2 %)
  • Language
    JavaScript
  • License
    GNU Affero Genera...
  • Created about 7 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The new Turtl server

Turtl server

Opening an issue? See the Turtl project tracker

This is the new Turtl server. It handles a number of things for Turtl clients:

  • Account management (join/login/delete)
  • Data storage
  • Syncing
  • Permissions and sharing

It implements a plugin architecture so things like analytics and payment processing can be used without forcing a particular method/service.

Running the server

The Turtl server requires Node >= 8 and a Postgres instance (>= 9.6) with a dedicated user/db set up for it.

Once you have Node and Postgres set up, do the following:

mkdir turtl
cd turtl
git clone https://github.com/turtl/server
cd server/
npm install
cp config/config.yaml.default config/config.yaml

Now edit config/config.yaml as needed. You'll want to main get your db settings correct, and uploads/s3 sections configured. Also, be sure to change app.secure_hash_salt (unless you're going to be running the integration tests against this server).

Now do:

# create the plugin directory from config.yaml#plugins.plugin_location
mkdir /path/to/plugin/dir    # (usually just plugins/ in turtl/server/)
./scripts/init-db.sh
node server.js

Great, done.

Running the server (via docker-compose)

You only have to run the following docker-compose command:

docker-compose up

It will spawn a postgres database and the turtl server itself. Now you have a running turtl which is available under 'http://localhost:8181'.

Be aware: after you cancel the docker-compose the data will be lost. For productive usage you may want to store the postgres-data inside a docker volume.

Configuration via ENV-Variables

In docker you may want to set each configuration value (for example the database) via environment variables. You can override each default value via environment variable! Just create a variable named with the prefix TURTLE_ followed by the "yaml-path" written in UPPERCASE. For example: If you want to change the app.api_url value you have to define the variable name like TURTL_APP_API_URL.

Some configuration values are explained in config/config.yaml.default.

Integration tests

If you want to run the integration tests against this instance of the server you need to do two things:

  1. Leave the app.secure_hash_salt value as it appears in config.yaml.default
  2. Run node tools/populate-test.data.js

More Repositories

1

desktop

Turtl's desktop app
JavaScript
679
star
2

js

Turtl's main app interface.
JavaScript
514
star
3

api

(Deprecated) Turtl API. This is the server that responds to all client requests.
Common Lisp
232
star
4

core-rs

Turtl's logic core, built in Rust. Made for embedding in other platforms (desktop, mobile, possibly browser w/ Emscripten).
Rust
190
star
5

android

Holds the wrappers (cordova) to run Turtl on Android
Java
126
star
6

tracker

This project is for tracking issues, bug reports, and progress on the entire Turtl project.
67
star
7

browser-extension

THE Turtl bookmarking extension.
JavaScript
51
star
8

core-cl

(experimental, deprecated) Common Lisp core for Turtl. The goal is to put all logic in lisp, and embed in other runtimes (Node-webkit, Android, iOS). Note that most desktop/mobile browsers now support the features that turt/js needs to run, so turtl/core has reached the end of its life. It remains as a reference or as a great place to pick up from if lisp is needed in the future.
Common Lisp
48
star
9

fdroid

An auto-generated repository for the FDroid project so they don't have to deal with a Cordova build system
JavaScript
24
star
10

www

Turtl website/marketing site/link endpoint
JavaScript
17
star
11

chrome-bookmarker

(Deprecated)
JavaScript
17
star
12

ios

Holds the wrappers (cordova) to run Turtl on iOS
JavaScript
10
star
13

ui

No, Turtl is not dead.
JavaScript
5
star
14

desktop-ff

(experimental, deprecated) Firefox version of the desktop app
JavaScript
3
star
15

chrome

(Deprecated) Turtl chrome extension
JavaScript
2
star
16

buildo

A collection of Makefiles and Dockerfiles to create Turtl builds
Shell
2
star
17

firefox

(Deprecated) Turtl firefox add-on
JavaScript
2
star
18

lib-permissions

Common permissions between server/core
Rust
2
star
19

tp2p

A limited-state library for p2p interactions between trusted nodes to exchange data
Rust
1
star