Giter VIP home page Giter VIP logo

appc-liveviewer-server's Introduction

LiveViewer - Server

Server-component for the LiveViewer App.

It takes a target platform and source URL and returns a ZIP file of the (Alloy compiled) project.

Prerequisites

  • Subversion: apt-get install subversion

Run the server

git clone https://github.com/appcelerator/appc-liveviewer-server
cd appc-liveviewer-server
npm install
npm start

In production you'd probably use forever start index.js or something like that.

Fiddle

Go to / to be redirected to /fiddle for a simple classic Titanium to JS-QR fiddle.

Compile

Download (and compile Alloy) code via:

/compile?platform=ios&url=https://github.com/appcelerator/alloy/tree/master/samples/rss

Param: url

An URL to get the Alloy or Classic source code from.

Accepted URLs

The server accepts the following URLs:

  • GitHub repositories:
    • https://github.com/<user>/<repo>
    • https://github.com/<user>/<repo>/tree/<branch>
    • https://github.com/<user>/<repo>/tree/<branch>/<dir>
    • https://github.com/<user>/<repo>/blob/<master>/<file>
  • GitHub gists URLs
    • https://gist.github.com/<user>/<gist>
    • https://gist.github.com/<user>/<gist>#file-<file>
  • URLs to a classic JavaScript or Alloy view file
  • URLs to a zip, tar, tar.bz2 or tar.gz file
  • TODO: TiFiddle URLs (#12)
Accepted source code

A directory must contain one of the following paths:

  • To be detected as Classic project:
    • Resources/app.js or Resources/<platform>/app.js
    • app.js or <platform>/app.js
  • To be detected as Alloy project:
    • app/controllers/index.js or app/controllers/<platform>/index.js
    • controllers/index.js or controllers/<platform>/index.js
    • app/views/index.xml or app/views/<platform>/index.xml
    • views/index.xml or views/<platform>/index.xml

A single file must either contain Ti.UI.* (classic) or <Alloy> (Alloy).

Param: platform (required)

A string with one of:

  • ios
  • android

Param: deployType (optional)

A string with one of:

  • production (default)
  • development
  • test

This param is only used for Alloy.

Require the engine

var engine = require('appc-liveviewer-server');

engine.auto('https://github.com/appcelerator/movies', 'ios', function(err, zip) {
	// do something with the path to the zip file
	// and don't forget to delete the zip file when you're done
});

auto(url, platform[, opts], callback)

Argument: url

See url under Run the server.

Argument: platform

See platform under Run the server.

Argument: opts

See deployType under Run the server.

Argument: callback

Will be called with error as first argument and the path to the generated zip-file as the second. You should clean up the zip-file after you're done wit it.

To Do

See issues

Licensing

This code is closed source and Confidential and Proprietary to Appcelerator, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Appcelerator. This file is licensed as part of the Appcelerator Platform and governed under the terms of the Appcelerator license agreement. Your right to use this software terminates when you terminate your Appcelerator subscription.

appc-liveviewer-server's People

Contributors

fokkezb avatar

Watchers

 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.