Code Monkey home page Code Monkey logo

textflow-alpha's Introduction

tijuana-sunrise

This Repo Contains:

  • TextFlow.us marketing site
  • TextFlow beta webapp
  • TextFlow alpha Slack integration
  • TextFlow Android WebView container with interface to access SMS and Contacts DB.

Installation and Deployment on a new server

The following assumes that the domain is textflow.us and that you're installing on a modern Debian-compatible flavor of Linux

Installing Dependencies

sudo npm install
  • Install MongoDB 3.4 or higher or sign up for a hosted instance. Create an empty database (the example below assumes the DB name is textflow)
  • Create an instance of Watson Tone Analyzer service on Bluemix and save the credentials.
  • Create a .env file and set the port, MongoDB connection string and Watson credentials to match your setup. If you want to use SSL, set PORT=80 and app will run on http:80 and https:443
PORT=80 
DB=mongodb://localhost:27017/textflow
WATSON_PASSWORD='Password for your tone analyzer service'
WATSON_USER = 'Username for your tone analyzer service'

Generate your SSL Certificates (production only)

NOTE: this app is configured to use CERTBOT on Debian 8 and assumes certificate location and type based on that. If you wish to use a different SSL provider or server OS, edit /bin/www to load the appropriate certificate

sudo apt-get install certbot -t jessie-backports
sudo certbot certonly

The CertBot UI will ask you some questions: enter your domain name where you're hosting and accept default settings for everything else

Start The App (Testing / Development)

sudo npm start

Running As A Service (Production)

If you want the site to stay up when you disconnect from the server, you need to run it as a service. Assuming you're on Debian 8, you can edit the service definition in /service/test.service file and update the file locations and username as follows:

  1. Create a user with root privileges (e.g. node_service). This account should not be used by humans for security reasons!
  2. nano ./service/test.service and update paths, working directory, etc.
  3. sudo cp ./service/test.service /etc/systemd/system
  4. sudo systemctl start test
  5. check by going to textflow.us in your browser or use: sudo journalctl -u test

Updating On The Remote Server

NOTE: Assumes a working installation as described above)

  1. SSH into remote.
  2. Stop the service: sudo systemctl stop test
  3. git pull
  4. Start the service sudo systemctl start test

API Documentation (DEPRECATED)

TODO!

textflow-alpha's People

Contributors

samrahimi avatar myersa avatar

Watchers

James Cloos 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.