Giter Site home page Giter Site logo

joewils / sinatranfsn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clpo13/sinatranfsn

0.0 1.0 0.0 9 KB

Sample Sinatra app for NearlyFreeSpeech.net

Home Page: https://sinatrapumansfn.nfshost.com

License: MIT License

Ruby 73.71% Shell 26.29%

sinatranfsn's Introduction

SinatraNFSN

Example Sinatra app for NearlyFreeSpeech.net (NFSN) using the Puma webserver.

Installing

Create a site at NFSN of the type Apache 2.4 Generic. Enable SSH access if it's not already activated, and SSH into the site to execute the following commands:

cd /home/protected/
git clone --depth=1 https://github.com/joewils/SinatraNFSN.git
cd SinatraNFSN
bundle config set --local path '/home/private//.gem'
bundle install

In the NFSN site control panel, add a daemon with these settings:

  • Tag: sinatra
  • Command Line: /home/protected/SinatraNFSN/run.sh
  • Working Directory: /home/protected/SinatraNFSN/
  • Run Daemon As: me

Add a proxy with the default settings:

  • Protocol: HTTP
  • Base URI: /
  • Document Root: /
  • Target Port: 8080

That's it! The daemon will start automatically after it's created. If there are no problems, you should see the words "Hello, world! This is Sinatra x.y.z." at the site's web address.

Troubleshooting

Check the file /home/logs/daemon_sinatra.log for log and error messages. Most importantly, make sure the daemon is running as "me" not "web". Otherwise, Ruby will fail to find the right gems and give an error on starting the server. Also check that the proxy port is the same as what Sinatra/Puma is listening on.

The app might break on NFSN realm updates. If you're getting errors about an incorrect bundler version, even when running bundle update --bundler, try deleting Gemfile.lock and running bundle install again.

License

This code is made available under the MIT license. Feel free to use and adapt it however you see fit.

sinatranfsn's People

Contributors

clpo13 avatar joewils avatar

Watchers

 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.