Quick implementation of components.
The latest version of FSComponents requires Swift 5.9 and MacOS v13 or later. You can download this version of the Swift binaries by following this link.
Add the FSComponents
package to the dependencies within your application’s Package.swift
file. Substitute "x.x.x"
with the latest FSComponents
release.
.package(url: "https://github.com/LLCFreedom-Space/fs-components.git", from: "x.x.x")
Add ValidationComponents
to your target's dependencies:
dependencies: [
.product(name: "ValidationComponents", package: "fs-components"),
],
import ValidationComponents
Add the FSComponents
package to the dependencies within your application’s Package.swift
file. Substitute "name branch"
with the latest FSComponents
release.
.package(url: "https://github.com/LLCFreedom-Space/fs-components.git", branch: "name branch")
Add ValidationComponents
to your target's dependencies:
dependencies: [
.product(name: "ValidationComponents", package: "fs-components"),
],
import ValidationComponents
An example of a method call from this library
First you need to setup allowed hosts in field - allowedHosts
app.allowedHosts = ["first-host", "second-host"]
After you setup you need to call middleware in configuration
app.middleware.use(AllowedHostsMiddleware)
To access the methods that are in this library, you need to call the application, since this library is an extension to the application
LLC Freedom Space – @LLCFreedomSpace – support@freedomspace.company
Distributed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3. See LICENSE.md for more information.