jazzdotdev / jazz

The Scripting Engine that Combines Speed, Safety, and Simplicity
Apache License 2.0
147 stars 11 forks source link

web server doesn't start when web-server is the only toml section #111

Open Arnaz87 opened 5 years ago

Arnaz87 commented 5 years ago

In torchbear-simple-webserver, when torchbear.toml is:

[web-server]
host = "0.0.0.0:3000"

It doesn't start. Instead, one has add another sections for it to work:

[web-server]
host = "0.0.0.0:3000"
[general]
init = "init.lua"
Arnaz87 commented 5 years ago

Relevant parts of the code:

https://github.com/foundpatterns/torchbear/blob/63df5c5d1942e9519eaa9b6e66128bcd31a3d86b/src/lib.rs#L143-L148

https://github.com/foundpatterns/torchbear/blob/63df5c5d1942e9519eaa9b6e66128bcd31a3d86b/src/lib.rs#L184

https://github.com/foundpatterns/torchbear/blob/63df5c5d1942e9519eaa9b6e66128bcd31a3d86b/src/lib.rs#L215

naturallymitchell commented 5 years ago
[general]
init = "init.lua"

this is supposed to be the most basic assumption for torchbear

Arnaz87 commented 5 years ago

init defaults to "init.lua", that's not the problem, the problem is that the toml needs at least two sections

naturallymitchell commented 5 years ago

why?

dariusc93 commented 5 years ago

The issue is that general isnt optional. I forgot I stashed that before committing, but both shouldve been optional. Will be pushing fix in a second

naturallymitchell commented 5 years ago

it still exits after first run. simple-webserver doesn't stay active.

dariusc93 commented 5 years ago

It works just fine for me with 0.6.2.

naturallymitchell commented 5 years ago

my bad.. let's see if we can get updating soon