Skip to content

Skygear Server - Open-source Mobile Backend, making app development easier.

License

Notifications You must be signed in to change notification settings

hidden-dimensions/skygear-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skygear Logo

Skygear Server is a cloud backend for making web, mobile and IoT app development easier.

It provides the following features for common app development:

  • Skygear Auth - User Auth, Forgot Password Social Login (Coming soon), Security
  • Skygear Cloud DB - Document-like API/SDK with auto-migration based on PostgreSQL
  • Skygear Chat - Build full-featured messaging into your app fast Server
  • Skygear Cloud Functions - Run event-trigger functions without thinking about server
  • Skygear CMS - Drop-in CMS for business users integrated with Skygear Auth and Cloud DB Opensource soon
  • Skygear Pubsub - Cloud Pub/sub API for real-time and reliable messaging and connection.
  • Skygear Push - Push Notification

Skygear Server / Cloud Functions are expected to be used with client side SDK:

Skygear.io is the commercial hosted platform for developers who don't want to manage their own infrastructure.

Slack Forum

Build Status Go Report Card

Getting Started

To get started, you need to have a Skygear Server and include one of the SDKs into your app.

The easiest way to start using Skygear is sign-up a free Development Plan at https://portal.skygear.io

Read the Skygear Server Guide for local deployment. Download binaries of Skygear Releases here

Connect your app to Skygear Server

Skygear provides SDKs for all the major platforms. Please refer to the guide for each platform to learn how to connect your app to Skygear Server: iOS / Android / JavaScript

Documentation

Can I Access The Docs Offline?

The skygear-doc repository is public and all the content files are in markdown. If you'd like to keep a copy locally, please do!

Support

If you believe you've found an bugs or feature requests for Skygear, please feel free to report an issue.

For questions and support, please reach us on the official forum or the community chat.

For issues about Skygear Guides please use the Skygear Guides issues tracker.

Configuration

Skygear is configure via environment variable. It also support .env file for easy development.

The minimal configuration will be provide API_KEY and MASTER_KEY

$ API_KEY=changeme MASTER_KEY=secret ./skygear-server

Check out .env for configuration reference. Once you configure the .env correctly, you can simple kick start the server by following.

$ ./skygear-server

How to contribute

Pull Requests Welcome!

We really want to see Skygear grows and thrives in the open source community. If you have any fixes or suggestions, simply send us a pull request!

Dependencies

  • Golang 1.9
  • PostgreSQL 9.5 with PostGIS extension
  • Redis
  • libsodium and zeromq if using ZeroMQ as a plugin transport

If using Mac OS X, you can get the ZeroMQ dependencies using Homebrew:

$ brew install libsodium zeromq

Building from source

The recommended way to set up development environment is by using vg. It install dependencies and supporting binaries.

$ brew install dep
$ go get -u github.com/GetStream/vg
$ vg setup
$ source ~/.bashrc  # assuming your shell is bash
$ vg init
$ vg ensure
$ # export WITH_ZMQ=1 # If you need ZeroMQ support
$ make build

If you do not want vg to manage a golang virtural environment, dep is a good alternative. However, dep doesn't install supporting binaries for you, so you cannot run lint or code generator.

$ brew install dep
$ dep ensure
$ # export WITH_ZMQ=1 # If you need ZeroMQ support
$ make build

Building with Nix

Assuming you have Nix installed, Skygear can be built with the following command:

nix-build

Build with ZeroMQ support:

nix-build -E '(import<nixpkgs>{}).callPackage ./default.nix {withZMQ=true;}'

You will have a symbolic link result-bin linking to the binary.

Testing

  1. Create a PostgreSQL database called skygear_test with PostGIS enabled:
psql -h db -c 'CREATE DATABASE skygear_test;' -U postgres
psql -h db -c 'CREATE EXTENSION postgis;' -U postgres -d skygear_test
psql -h db -c 'CREATE EXTENSION citext;' -U postgres -d skygear_test
  1. Test case assume the 127.0.0.1 have access to skygear_test, add the following to pg_hba.conf:
host    all             all             127.0.0.1/32            trust
  1. Install golang packages required for testing (check .travis.yml for the list).

  2. Run go test github.com/skygeario/skygear-server/pkg/....

You can also run the test suite in Docker:

$ make vendor WITH_DOCKER=1  # install dependencies
$ make before-docker-test    # start dependent services
$ make test WITH_DOCKER=1    # run test
$ make after-docker-test     # clean up docker containers

Debugging

Delve is ready to use in the docker image skygeario/skygear-godev, with some extra setting:

  • With docker, you need to pass --security-opt=seccomp:unconfined to docker run
  • With docker-compose, you need to add - seccomp:unconfined to security_opt: under the container you want to run Delve

See https://github.com/derekparker/delve for more details of Delve.

License & Copyright

Copyright (c) 2015-present, Oursky Ltd.
All rights reserved.

This source code is licensed under the Apache License version 2.0
found in the LICENSE file in the root directory of this source tree.
An additional grant of patent rights can be found in the PATENTS
file in the same directory.

About

Skygear Server - Open-source Mobile Backend, making app development easier.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.8%
  • Shell 0.6%
  • Makefile 0.3%
  • Nix 0.1%
  • Dockerfile 0.1%
  • Augeas 0.1%