Code Monkey home page Code Monkey logo

Comments (10)

TheFox avatar TheFox commented on September 24, 2024

Try it with a '/' (Slash) after "web_root". Sometimes it works better with a slash at the end.

from asmttpd.

vishaltelangre avatar vishaltelangre commented on September 24, 2024

@TheFox, thanks for the instant reply, but it's giving the same error whether I provide the directory with ending foreslash or not.

asmttpd - 0.08

Using Document Root: web_root/
An error has occured, exiting

Same error persists if I use directory (as webroot) other than the provided directory (web_root) in this project's repository.

from asmttpd.

TheFox avatar TheFox commented on September 24, 2024

And if you use the absolute path?

from asmttpd.

vishaltelangre avatar vishaltelangre commented on September 24, 2024

@TheFox: Same result with absolute path:

$ sudo ./asmttpd /home/vishal/projects/asmttpd/web_root/
asmttpd - 0.08

Using Document Root: /home/vishal/projects/asmttpd/web_root/
An error has occured, exiting

from asmttpd.

nemasu avatar nemasu commented on September 24, 2024

Hi. Yeah I've got to improve that error message. Most likely port 80 is in use. You can make sure by using strace. Eg: strace ./asmttpd /blah

from asmttpd.

vishaltelangre avatar vishaltelangre commented on September 24, 2024

@nemasu Yep! That's the error which was causing it to exit. Thanks, and please surely change the error message appropriately.

Trace printed on stdout is something:

[truncated]
bind(4, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
[truncated]

Can I provide different port, is it implemented yet?

BTW, you can close this issue by now.

from asmttpd.

smougel avatar smougel commented on September 24, 2024

have a config file should be a good solution... or simply by adding arguments to cmd line

from asmttpd.

nemasu avatar nemasu commented on September 24, 2024

Yeah, leaning toward command line options.

from asmttpd.

nemasu avatar nemasu commented on September 24, 2024

The port is defined near the top of main.asm. Keep in mind it's in network byte order.

from asmttpd.

vishaltelangre avatar vishaltelangre commented on September 24, 2024

Yeah, reading a config file something like .asmttpdrc from home directory is a good idea, as so many popular softwares have such run commands files. Also accepting command line options, for example, -d <path/to/webroot/dir>, -p <desired-port-number> is also a convenient thing to consider.

from asmttpd.

Related Issues (20)

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.