Git Product home page Git Product logo

squirrel.server's Introduction

Squirrel Server

This Rack application implements the server side component for Squirrel.Mac. It is Heroku compatible and should get you started setting up your own Squirrel server.

Bootstrap

Updates are read from db/releases.json which is a JSON array of Squirrel releases. Add your releases to this file before running or deploying.

Running locally

  1. Run script/bootstrap.
  2. Run script/server

The updates are served locally for testing, to use your local server set your update URL host to localhost:9393 for testing, see Configuring your client.

Deploying the server

  1. Install the Heroku Toolbelt.
  2. Run script/heroku-deploy to create the app on Heroku and push the code.

Configuring your client

Once you've deployed your sever, you need to configure a client to query it for updates.

The example server compares a version query parameter to determine whether an update is required.

The update resource is /releases/latest, configure your client SQRLUpdater.updateRequest:

NSURLComponents *components = [[NSURLComponents alloc] init];

components.scheme = @"http";

BOOL useLocalServer = NO;
if (useLocalServer) {
  components.host = @"localhost";
  components.port = @(9393);
} else {
  components.host = @"my-server.herokuapp.com";
}

components.path = @"/releases/latest";

NSString *bundleVersion = NSBundle.mainBundle.sqrl_bundleVersion;
components.query = [[NSString stringWithFormat:@"version=%@", bundleVersion] stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet]

self.updater = [[SQRLUpdater alloc] initWithUpdateRequest:components.URL];

squirrel.server's People

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.