Coder Social home page Coder Social logo

glot-snippets's Introduction

glot-snippets

Build Status

Overview

glot-snippets provides a http api for storing and managing snippets. Snippets can be stored anonymously or as a user by including an api token with the request. CouchDB is used as the datastore. The api is described here.

Run

The download above is a standard erlang release that includes a start script. To start glot-snippets in the foreground type: glot/bin/glot foreground.

Environment variables

glot-snippets takes it's configuration from environment variables. All vars needs to be set, no default values are provided.

Variable name Allowed values Example Description
API_ENVIRONMENT development | production production Development mode will enable auto compiling of changed files
API_HTTP_LISTEN_IP <ipv4 address> 0.0.0.0 Listen ip
API_HTTP_LISTEN_PORT 1-65535 8090 Listen port
LOG_PATH <filepath> /home/app/log/ Path to save logs
BASE_URL <url> https://snippets.glot.io Base url to where the api is hosted
ADMIN_TOKEN <string> some-secret Admin token used to access the /admin endpoints
DB_URL <url> http://10.0.0.9:5984 Url to CouchDB
DB_USER <string> glot CouchDB user
DB_PASSWORD <string> secret-password CouchDB password

Api users

Users can be created with the /admin/users endpoint. See the api docs for more details.

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.