Git Product home page Git Product logo

foxhole's Issues

getPostData throws

So I've been trying to get enough info from your code here to parse the body of a tink_http request to String. I kept getting nowhere and decided to test with foxhole itself and I'm running into the same issue. Running Web.getPostData() always throws:

[...]
Called from tink/io/Pipe.hx line 38
Called from tink/io/Pipe.hx line 44
Called from tink/io/Sink.hx line 179
Uncaught exception - Error: Uncaught exception: Invalid call tink.runloop.QueueWorker.execute:70

This happens somewhere in the pipeTo call, the handle is never reached.
I've been going through tink_io but I'm not really sure how to debug this.

Setup

I've been trying to setup a basic test of tink_http, but didn't get far. Then I figured I try using foxhole first since it should be easier to get going. I'm running into the same problem though. I set up your example like this:

class Main {
  static function respond() {
    Sys.println('This works');
  }
  static function main() {
    foxhole.Web.run({
      handler: respond,
      watch: true
    });
  }
}

This compiles but does not seem to keep running. Output is this:

Main.hx:24: count 0 -> Worker:ROOT_LOOP/worker#0
Main.hx:24: count 1 -> Worker:ROOT_LOOP/worker#1
(...)
Main.hx:24: count 28 -> Worker:ROOT_LOOP/worker#3
Main.hx:24: count 29 -> Worker:ROOT_LOOP/worker#4

After that the process stops and no requests are served. I've tried without watch:true and --run Forever as well, but that just seems to run the process indefinitely.

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.