Giter Site home page Giter Site logo

porchetta's Introduction

Porchetta Server Build Status

A bad-ass socket server for activecell. Use porchetta-client to work with on client side.

Start Server

It's so easy to start server npm start. Server accepts 2 additional params:

  • PORT - [default: 4000] server's port
  • LOG_LEVEL - [default: 1] socket.io log level: 1 - warn, 2 - info, 3 - debug
LOG_LEVEL=3 PORT=5000 npm start

Development

Use History.md and versions to log your actions.

One minute setup

  • npm install - to install dependencies
  • npm test - to run tests and ensure that all pass.
  • npm run watch - to start development server locally on http://localhost:4000. It restarts on every change.

Deploy

In order to deploy you need install jitsu locally (npm install -g jitsu) and login as activecell user (ask @adamrneary for password).

$ ./script/deploy-production
$ ./script/deploy-staging

This scripts helps to manage ugly nodejitsu restrictions: rewrite of package.json, and not ability to deploy staging. More control can be found on https://webops.nodejitsu.com/apps/porchetta. Available domains:

porchetta's People

Contributors

alekseykulikov avatar lucassus avatar jedius avatar nfedyashev avatar

Watchers

Kamil Sarna avatar James Cloos avatar  avatar  avatar

porchetta's Issues

Real handshake with activecell

Uncomment https://github.com/activecell/porchetta/blob/master/lib/index.js#L7

it seems, cookie authentication does not work through domains. I have another example, inspired by intercom:

  1. On the client:
hash  = $('meta [name="user_hash"]').attr("content")
email = app.user.get('email')
query = "email=#{email}&hash_email=#{hash}"
new Porchetta(http://localhost:4000, app.company.id, { query: query })
  1. Porchetta server pass data.query to POST /api/v1/handshake.json
  2. On server:
  • generate meta tag user_hash with SHA256 for app page with secret key
  • on handshake_controller validate email & hash_email with secret key

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.