Comments (4)
Hey! You can always check out source code: https://github.com/BiAtoms/Http.swift/blob/master/Sources/Server.swift
That said, try
may throw an error and it should be handled within do catch
block. Or use either try!
try?
As for your second question, yes jus do server.stop()
from http.swift.
and a second question, how to use a certain port and can I use server.stop or similar to stop server?
from http.swift.
Thanks for your reply
from http.swift.
Forgot to mention, to run server on different port you can do try! server.run(port: 4443)
from http.swift.
Related Issues (19)
- Add support for Linux and macOS
- iOS13 API deprecated HOT 1
- How to make client authentication HOT 2
- How do you run the app on a different Mac without the libressl installation? HOT 2
- Upgrade to swift 5 HOT 2
- Issue with api pattern HOT 3
- Cannot intercept all routes HOT 2
- Multipart Requests HOT 2
- Headers are case-sensitive HOT 2
- Run on Device HOT 5
- How to SSL? HOT 1
- how do I connnect it with a directory? HOT 1
- The server fails to serve big files!
- Carthage? HOT 5
- SSL / TLS? HOT 8
- Playing .mp4 encrypted video HOT 2
- how to set headers HOT 4
- Possible memory leak HOT 5
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 http.swift.