GithubHelp home page GithubHelp logo

Comments (8)

damian-kolakowski avatar damian-kolakowski commented on May 7, 2024

It's must have feature. I will add this.

from swifter.

curveddesign avatar curveddesign commented on May 7, 2024

Damian, is there any estimation of when static html file support will be added? It would be interesting to run this little server from the command line on a https://macstadium.com server as an experiment. It might allow me to migrate away from my Amazon Web Services (AWS) micro-instance. AWS virtual instances can be so much trouble and it might be interesting to go all Mac. Also, swifter is cool because it is entirely written in Swift!

from swifter.

damian-kolakowski avatar damian-kolakowski commented on May 7, 2024

I will add this today.

from swifter.

curveddesign avatar curveddesign commented on May 7, 2024

Damian, awesome! Thanks for your hard work, I love Swift!

I know there is already an "iOS" target in Xcode but it might be cool if you could also add an "OS X" target for desktop machines.

from swifter.

damian-kolakowski avatar damian-kolakowski commented on May 7, 2024

I added directories sharing ( 0008079 )

Here you have an example how to serve files from directory ( pls run demo and visit /resources/test.json ):

server["/resources/(.+)"] = NSBundle.mainBundle().resourcePath

I know there is already an "iOS" target in Xcode but it might be cool if you could also add an "OS X" target for desktop machines.

I will add this as well.

from swifter.

curveddesign avatar curveddesign commented on May 7, 2024

I need a little help in figuring out the regular expressing for a nested directory?

html files, for example in a "nesteddir" subdirectory, to the /resources directory do not get returned...

If I put in "/resources/nesteddir/page.html" I get a 404.

page.html is just a simple html file...

Test

Test 123456789......

from swifter.

damian-kolakowski avatar damian-kolakowski commented on May 7, 2024

I added OSX target with demo app.

Here you have an example how to server all files from home directory:

bd8e9c0#diff-e49efa2180de5abf1c3e68c6d413b2cbR13

Best

from swifter.

curveddesign avatar curveddesign commented on May 7, 2024

Damian, awesome! Now all we need is HTTPS support and it is ready to take on Apache httpd! ;-)

Not sure if anyone has done HTTPS using a default cert totally in Swift yet? Not sure the crypto libraries are there? I bet someone somewhere is working on it! This may be worthy of a new issue?

from swifter.

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.