Giter Site home page Giter Site logo

How to install about tppm HOT 5 OPEN

sharkykh avatar sharkykh commented on May 31, 2024
How to install

from tppm.

Comments (5)

sharkykh avatar sharkykh commented on May 31, 2024

👋
There's no need to install anything - this is a web application you can use: sharkykh.github.io/tppm.
Unless you're asking because you want to host it locally?

from tppm.

alanmilinovic avatar alanmilinovic commented on May 31, 2024

Yes, I like to have things locally. 😀

from tppm.

sharkykh avatar sharkykh commented on May 31, 2024

Alright 👍
So I have to say I don't know much about RPi3, but the basic things you need are:

This project isn't really set up to host it locally as it is on the website yet.
Right now you can run the development server using:

# installs the project dependencies into the folder `./node_modules`
yarn install
# runs the dev-server
yarn dev-server --port 8080 --host 0.0.0.0

Which will run a local server at the port you specify.
--host 0.0.0.0 will open it to the network (normally it's limited to localhost)

I will set up an easier way to run this as a local server tomorrow at the latest.

from tppm.

alanmilinovic avatar alanmilinovic commented on May 31, 2024

tnx for a very quick response. Looking forward to easier setup.

from tppm.

sharkykh avatar sharkykh commented on May 31, 2024

@Amilino
Unfortunately I tried doing that, but I couldn't make it work. I'm sorry!
TL;DR: You will only be able to use it if you're opening it on the browser as http://localhost:8080.
If you don't, the requests to Trakt will just be blocked by the browser.
In any case,
I updated the code so that yarn install + yarn start will start a server on localhost, port 8080.

The longer story:
Because this app makes calls to the Trakt API directly from the browser (without a server in between), there's something called CORS,
which means the browser will reject (or maybe it's the Trakt servers, not sure right now) any requests originating from host names that are not listed as approved for the API application on Trakt.

I can only add fully qualified host names to that list - it does not accept any wildcards, so I can't even have localhost with any port.

This is all because I built this app with the intention of it being able to run entirely in the browser, and only need simple web hosting (which GitHub Pages provides).

I am not planning on rewriting it to be able to be run on different domains.
But there are two alternatives I can think of:

  1. There's the original Python GUI application I made, which doesn't run a server,
    but it does require Python and a few Python dependencies to be installed.
  2. I think it's a stretch, but you could create your own API application on Trakt with the "Redirect uri" and "Javascript (cors) origins" set to the local address you want to put in the browser, then update these three values in the code with your application's values.
    (And if you want to change the server port, it's here.)

from tppm.

Related Issues (11)

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.