Comments (8)
It's must have feature. I will add this.
from swifter.
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.
I will add this today.
from swifter.
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.
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.
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...
TestTest 123456789......
from swifter.
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.
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)
- How can I call an async function with callback from within the route callback and still be able to return a HttpResponse
- websocket sometimes not working in macOS sandbox app HOT 1
- LICENSE file contains placeholder text.
- usleep degrades when using Swifter
- Unable to connect to server HOT 1
- tvOS 16 Beta 2 Unable to override the Stub that has same url
- Builds fails when trying to use `Swifter` in XCUITest HOT 3
- 404 Not Found HOT 1
- Building release is extremely slow
- Enhancement request: Swifter to label .wasm files as "application/wasm" when it serves them
- Can the development on this package be sponsored?
- IOS 16.4problem: Restricted network ports are not allowed HOT 3
- How to get post parameters ?
- How to set multiple responses for one endpoint?
- Question for loading index.html + subdirrectories HOT 1
- Support regular expression
- Bind operation not permitted - MacOS - UITests
- Privacy Manifest HOT 6
- HttpServer does not support for multicast
- Release new version from stable branch (Cocoapods)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swifter.