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 Authentication, Social Login, 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, JS
SDK, Android
SDK, iOS
SDK
- 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.io is the commercial hosted platform for
developers who don't want to manage their own infrastructure.
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.
Please do not use the issue tracker for personal support requests. Instead, use
Stack Overflow community,
join our Google Group,
or Slack Team to chat with our
supports/developers.
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.8
- PostgreSQL 9.5 with PostGIS extension
- Redis
- libsodium, zeromq and czmq if using ZeroMQ as a plugin transport
If using Mac OS X, you can get the ZeroMQ dependencies using Homebrew:
$ brew install libsodium zeromq czmq
Building from source
$ go get github.com/Masterminds/glide
$ make vendor
$ # 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
- 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
- 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
-
Install golang packages required for testing (check .travis.yml
for the
list).
-
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.