Code Monkey home page Code Monkey logo

server's Introduction

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

server's People

Contributors

dependabot[bot] avatar duncanturk avatar ldidry avatar mrk-te avatar orthecreedence avatar rainu avatar randompherret avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.