Giter VIP home page Giter VIP logo

viacrypt's Introduction

ViaCRYPT

One time read messaging system. You can try it at viacry.pt.

Quick Start

Assuming you have node.js and grunt-cli and just cloned the project.

Development

npm install
grunt run
# go to localhost:8001 and have fun developing

Production

npm install
# configure config/server.js
grunt
# automate the following with supervisor/upstart/...
./bin/viacrypt-server
# go to yourserver.com if you either have configured port 80
# or proxied it to 8001 and enjoy your deployment

Getting Started

Requirements

Dependencies are handled by npm and installed like this:

npm install

You will also need to install the grunt-cli globally if you don't already have it.

npm install -g grunt-cli

Configuring

Currently we're using node-config to manage configurations.

Typically you should config/development.js (or .json, .yaml, .yml) to set your specific preferences. It is also possible to create multiple configuration environments and also custom configs to a machine hostname. You should read the node-config documentation for more information on that regard.

An static directory is generated from the assets and templates dirs, and some dependencies that need to be downloaded. Those tasks are automated with grunt.

To generate the static dir, simply run grunt on the project root:

grunt

That step is needed when using ./bin/viacrypt-server to update the files it will serve, or when serving the files with your http server (nginx, varnish, apache, ...).

Running

Should be as simple as

./bin/viacrypt-server

or

grunt run

for development, this one will recompile and reload on demand as sources change, more a less like django's ./manage runserver.

Then checkout localhost:8001 (or whatever you have configured) to see the app.

Translating

Translations are being done with Jed in a gettext compatible way, translation files should be located on locale/<LANG>/messages.po with their respective locale/<LANG>/messages.json used by Jed, don't worry po2json can make that conversion, used on a handy script: ./xgettext.sh.

To create a new translation one can use locale/messages.pot as a template.

There is a script to update the current translations, it is the recommended way right now.

./xgettext.sh

That script depends on a global modified version of handlebars-xgettext (available here installable like npm install vialink/handlebars-xgettext) and po2json also installed globally.

We are aware that it only works on POSIX systems contributions to improve this subsystem are very welcome.

Deploying

Supervisor

Put the following typically on /etc/supervisor/conf.d/viacrypt.conf.

[program:viacrypt]
command=/path/to/viacrypt/bin/viacrypt-server
stdout_logfile=/path/to/viacrypt/logs/viacrypt.log

To start it:

supervisorctl start viacrypt

Supervisor has the advantage of automatic restart of the process on failures.

Upstart

Put the following typically on /etc/init/viacrypt.conf.

description "ViaCRYPT node.js server"
start on startup
stop on shutdown
exec /path/to/viacrypt/bin/viacrypt-server >> /path/to/viacrypt/logs/viacrypt.log

To start it:

start viacrypt

viacrypt's People

Contributors

jansegre avatar rasinhas 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.