Difference between revisions of "Vapor"

From Coder Merlin
(Created page with "== Configuration == In the path: {{Pathname|./Sources/App/configure.swift}}: <syntaxhighlight lang="swift"> // Set local port guard let portString = Environment.get("IGIS_LOC...")
 
(Updated to dynamic library)
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Configuration ==
== Getting Started ==
In the path: {{Pathname|./Sources/App/configure.swift}}:
{{ConsoleLine|john-williams@codermerlin:~$ |<nowiki>git clone https://github.com/TheCoderMerlin/VaporShell</nowiki> }}


<syntaxhighlight lang="swift">
== Building ==
// Set local port
{{ConsoleLine|john-williams@codermerlin:~$ |build}}
guard let portString = Environment.get("IGIS_LOCAL_PORT") else {
    fatalError("Failed to determine IGIS LOCAL PORT from environment")
}
guard let port = Int(portString) else {
    fatalError("Malformed IGIS LOCAL PORT: \(portString)")
}
app.http.server.configuration.port = port


// Set local host
== Run ==
guard let hostname = Environment.get("IGIS_LOCAL_HOST") else {
{{ConsoleLine|john-williams@codermerlin:~$ |run}}
    fatalError("Failed to determine IGIS LOCAL HOST from environment")
 
}
The server will then answer at https://www.codermerlin.com/vapor/(user-name)/
app.http.server.configuration.hostname = hostname
</syntaxhighlight>

Revision as of 08:54, 18 January 2023

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Getting Started[edit]

john-williams@codermerlin:~$  git clone https://github.com/TheCoderMerlin/VaporShell

Building[edit]

john-williams@codermerlin:~$  build

Run[edit]

john-williams@codermerlin:~$  run

The server will then answer at https://www.codermerlin.com/vapor/(user-name)/