Code Monkey home page Code Monkey logo

drawbridge's Introduction

Drawbridge

A tool to deploy a static site to a fully protected GAE instance

What is this for?

Have a static site or just an HTML page you wanna show a client? You can easily push content to a remote, secure and whitelisted site.

Release 2.0

Now manages all projects under a single GAE App ID. Each project is considered a project version, which gets around the 10 project limit Google imposes.

Features

  • Defaults to protected, including asset files (css, img and js)
  • Allows management of authorized users @ /admin
  • Allows wild card domains, like leftfieldlabs.com, to allow whole groups

TODO

  • Tests
  • Cleaner admin
  • Apps are deployed to subdomain of unified system
  • Delete/update users

Requirements

Installing

  1. Clone repo
  2. Navigate to your newly cloned folder and run sudo ./scripts/install

or

  1. Via curl with curl -s https://raw.githubusercontent.com/leftfieldlabs/drawbridge/master/scripts/install | sh

Using and deploying

  1. Create a Google Cloud Platform (GCP) project, but don't create an AppEngine instance. Must be project owner to deploy.
  2. From inside the directory with all your site assets, run drawbridge deploy [app-id] [release]
  3. Visit [release]-dot-[app-id].appspot.com to see your site

Whitelisting

  1. Head to [release]-dot-[app-id].appspot.com/admin with your GCP email.
  2. Add users or organizations.

Updating

Run drawbridge update from anywhere to get latest vault code

Local server

Run drawbridge local from directory with content to test locally. Keep in mind this does not currently refresh code changes. You'll need to re-run the command to get latest changes from your code.

Using DrawbridgeJS

If you are using Drawbridge, this is a tool to help you store data persistently in a rush. Think of Parse or Firebase, but exclusively for Drawbridge.

Including it in your project

Simply add <script src="/__tools__/drawbridge.js"></script> to the <head /> of your index.html and you're set.

Notes

Just like Drawbridge, this is not intended to be high performing. Nor can you store tons of data. When you save, the data object is serialized and stored in a GAE Datastore instance. There is currently a 1MB max size.

Example

var dr = new Drawbridge.Record("some-drawbridge-project-name");
dr.set('someKey', 2); // Not yet saved
dr.set('someOtherKey', ["example", 2, "something"]); // Not yet saved
dr.save(function(data) {
    // on success, do something
});

console.log(dr.get('someKey'));

Notes

  • If a URI goes to a directory, like http://someapp-dot-something.appspot.com/something/, it will attempt to load an index.html. It will not work with anything else

Feature requests

If you need a new feature, please create an issue or (better yet) submit a pull request.

drawbridge's People

Contributors

darkpicnic avatar elee-lfl avatar

Watchers

James Cloos avatar Daniel S. 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.