Code Monkey home page Code Monkey logo

orlytalk's People

Contributors

dependabot[bot] avatar longor1996 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

orlytalk's Issues

Can't connect to websocket -> wrong host

Hi Lars,

first, this is a great App ๐Ÿ‘

Although I have a problem. I have deployed this App on my server orlytalk.sharknoon.de and can't log in because the connection with the websocket fails.

I am on Port 443 (HTTPS) and because this is the default port, location.port returns "" (empty String).

And here is the problem, in your index.ts you are checking if the Port is 6991, but in this case it isnt:

const HOST = location.port !== '6991' ? "localhost:6991" : location.host;

I suggest changing this line to

 const HOST = location.host + ":" + location.port;

or some other mecanics to avoid the localhost host to be selected for standard HTTP and HTTPS ports.

Thanks in advance

Your fan

Josua frank

Docker Description for README

The Docker Description for the README is missing.

Maybe add something along the lines of:


To build and run O'Rly Talk, run the following commands:

docker build . -t orlytalk
docker run -p 6991:6991 orlytalk

And visit localhost:6991

Create Folder and Database File if it doesnt exist already

Problem:

When specifying an environment variable like ./data/sqlite.db a folder named data needs to be created.

The problem is, that docker volume mounts can only mount directories, not individual files. Therefore a custom directory would be needed.

While you could use a directory from the underlying linux distribution, this would introduce new dependencies to the os.

This is the current implementation:

let current_exe = std::env::current_exe().expect("Executable Location");
let working_dir = current_exe.parent().expect("Working Directory");
println!("Working Directory: {:?}", working_dir);
let db_file_name = std::env::var("ORLYTALK_SQLITE_FILE").unwrap_or_else(|_e| "db.sqlite".to_string());
let db_file_path = working_dir.join(db_file_name);
println!("Database File: {:?}", db_file_path);
let db_conn = rusqlite::Connection::open(db_file_path).expect("Failed to start SQLite!");

I would suggest creating all parent directories of the sqlite.db file is they doesnt already exist.

Another Problem with this solution

when specifying an absolute path like /etc/orlytalk/sqlite.db this path gets appended to the working directory. If the path starts at root, the exapth path should be used.

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.