diff --git a/build/2.0/getting-started/manual/index.html b/build/2.0/getting-started/manual/index.html index 9b524102..0b58c445 100644 --- a/build/2.0/getting-started/manual/index.html +++ b/build/2.0/getting-started/manual/index.html @@ -304,13 +304,6 @@ Edit Package.swift - - -
Learn how to create a Vapor project without the Toolbox using just Swift 3 and the Swift Package Manager.
-This document assumes that you have Swift 3.1 installed.
+Learn how to create a Vapor project without the Toolbox using just Swift 3 and the Swift Package Manager (SPM).
+This document assumes that you have Swift 3.1 installed, if not please refer to Swift.org before you can continue.
Tip
If you'd prefer to use the Toolbox, follow the toolbox guide here.
@@ -1656,7 +1630,7 @@ swift package init --type executableYour folder should look like this:
+Your folder structure should look like this:
├── Package.swift ├── Sources │ └── main.swift @@ -1670,9 +1644,10 @@ swift package init --type executable
And add Vapor as a dependency. Here's how your file will look.
-import PackageDescription +And add Vapor as a dependency. Here's how your
+Package.swiftshould look like.// swift-tools-version:3.1 + +import PackageDescription let package = Package( name: "Hello", @@ -1691,17 +1666,17 @@ swift package init --type executableA simple hello world:
-import Vapor -let drop = Droplet() +let drop = try Droplet() drop.get("hello") { req in return "Hello Vapor" } -drop.run() +try drop.run()Compile & Run¶
+Compile & Run (Development)¶
The first
buildcommand can take a while to fetch dependencies.-swift build .build/debug/Hello serve @@ -1719,7 +1694,7 @@ swift package init --type executableView¶
+View¶
Go to your favorite browser and visit
diff --git a/build/2.0/index.html b/build/2.0/index.html index 378fb769..70c29592 100644 --- a/build/2.0/index.html +++ b/build/2.0/index.html @@ -1856,7 +1856,7 @@http://localhost:8080/helloLeaf Provider: Leaf provider for Vapor. -Redbird: Pure-Swift Redis client implemented from the original protocol spec.. +
- Redis: Pure-Swift Redis client implemented from the original protocol spec.
@@ -1879,7 +1879,7 @@
- Redis Provider: Redis cache provider for Vapor.
Kitura Provider: Use IBM's Kitura HTTP server in Vapor. -SwiftyBeaver: Adds the powerful logging of SwiftyBeaver to Vapor. +SwiftyBeaver: Adds the powerful logging of SwiftyBeaver to Vapor. APNS: Simple APNS Library for Vapor (Swift). VaporFCM: Simple FCM (iOS + Android Push Notifications) library built for Vapor in Swift. VaporS3Signer: Generate V4 Auth Header/Pre-Signed URL for AWS S3 REST API diff --git a/build/2.0/mkdocs/search_index.json b/build/2.0/mkdocs/search_index.json index 3e2aa19f..41ae57a0 100644 --- a/build/2.0/mkdocs/search_index.json +++ b/build/2.0/mkdocs/search_index.json @@ -2,7 +2,7 @@ "docs": [ { "location": "/", - "text": "Vapor Documentation\n\n\nThis is the documentation for Vapor, a Web Framework for Swift that works on iOS, macOS, and Ubuntu; and all of the packages that Vapor offers.\n\n\nVapor is the most used web framework for Swift. It provides a beautifully expressive and easy to use foundation for your next website or API.\n\n\nGetting Started\n\n\nIf this is your first time using Vapor, head to the \nGetting Started\n section to install Swift and create your first app.\n\n\nLike Vapor?\n\n\nOur small team works hard to make Vapor awesome (and free). Support the framework by starring Vapor on GitHub or donating $1 monthly--it helps us a lot. Thanks!\n\n\n\n \n\n\n\n\n\n \n\n\n\n\nOther Sources\n\n\nHere are some other great places to find information about Vapor.\n\n\nAPI\n\n\nAuto-generated API documentation is located at \napi.vapor.codes\n.\n\n\nStack Overflow\n\n\nView or ask questions related to Vapor on Stack Overflow using the \nvapor\n tag.\n\n\nGitHub\n\n\nSource Code\n\n\nTo view the framework's source code and code documentation, visit \nVapor's GitHub\n.\n\n\nIssues\n\n\nTo view open bug reports and feature requests, or to create one, visit the \nissues\n tab on \nVapor's GitHub\n.\n\n\nPackages\n\n\nVapor is a modular framework built for a modular language. Code is split up into modules which are grouped to form packages. Packages can be added to your project by adding the package's Git url to your \nPackage.swift\n file. Once a package is included, all of its modules will be available to \nimport\n. You can read more about packages and modules in the Swift Package Manager \nconceptual overview\n. \n\n\nBelow is a list of packages and modules that come with or can be used by Vapor projects. Packages will have a link to their respective GitHub page.\n\n\nCore\n\n\nCore packages are maintained by the Vapor team. \n\n\nIncluded\n\n\nThe following packages are included with Vapor by default.\n\n\n\n\nTip\n\n\nThese packages can also be used individually\n\n\n\n\n\n\nVapor\n: Swift's most used web framework.\n\n\nAuth: User authentication and persistance.\n\n\nSessions: Secure, ephemeral cookie based data storage.\n\n\nCookies: HTTP cookies.\n\n\nRouting: Advanced router with type-safe parameterization.\n\n\n\n\n\n\nEngine\n: Core transport layers.\n\n\nHTTP: HTTP client and server.\n\n\nURI: URI parsing and serializing.\n\n\nWebSockets: Full-duplex communication channels over a single TCP connection.\n\n\nSMTP: Send email using Sendgrid and Gmail.\n\n\n\n\n\n\nMultipart\n: Fast, streaming, non-blocking multipart parser and serializer.\n\n\nMultipart: Parses and serializes \nmultipart/mixed\n.\n\n\nFormData: Parses and serializes \nmultipart/form-data\n.\n\n\n\n\n\n\nJSON\n: Conveniences for working with JSON in Swift.\n\n\nConsole\n: Swift wrapper for console IO and commands.\n\n\nTLS\n: Swift wrapper for CLibreSSL's new TLS.\n\n\nCrypto\n: Cryptography from LibreSSL and Swift.\n\n\nDigests: Hashing with and without authentication.\n\n\nCiphers: Encryption and decryption\n\n\nRandom: Pseudo and cryptographically secure randomness.\n\n\nBCrypt: Pure Swift implementation.\n\n\n\n\n\n\nNode\n: Data structure for easy type conversions.\n\n\nPolymorphic\n: Syntax for easily accessing values from common types like JSON.\n\n\nPath Indexable\n: A protocol for powerful subscript access of common types like JSON.\n\n\n\n\n\n\nCore\n: Core extensions, type-aliases, and functions that facilitate common tasks.\n\n\nSocks\n: Swift C Socket API wrapper.\n\n\nBits\n: Low level byte manipulation helpers\n\n\n\n\nProviders\n\n\nThese are officially supported packages for Vapor that are not included by default.\n\n\n\n\nFluent\n: Models, relationships, and querying for NoSQL and SQL databases.\n\n\nFluent Provider\n: Fluent provider for Vapor.\n\n\n\n\n\n\nMySQL\n: Robust MySQL interface for Swift.\n\n\nMySQL Driver\n: MySQL driver for Fluent.\n\n\nMySQL Provider\n: MySQL provider for Vapor.\n\n\n\n\n\n\nLeaf\n: An extensible templating language.\n\n\nLeaf Provider\n: Leaf provider for Vapor.\n\n\n\n\n\n\nRedbird\n: Pure-Swift Redis client implemented from the original protocol spec..\n\n\nRedis Provider\n: Redis cache provider for Vapor.\n\n\n\n\n\n\nJWT\n: JSON Web Tokens in Swift.\n\n\nJWT Provider\n: JWT conveniences for Vapor.\n\n\n\n\n\n\n\n\nCommunity\n\n\nThese are packages maintained by community members that work great with Vapor.\n\n\n\n\nPostgreSQL\n: Robust PostgreSQL interface for Swift.\n\n\nPostgreSQL Driver\n: PostgreSQL driver for Fluent.\n\n\nPostgreSQL Provider\n: PostgreSQL provider for Vapor.\n\n\n\n\n\n\nMongoKitten\n: Native MongoDB driver for Swift, written in Swift\n\n\nMongo Driver\n: MongoKitten driver for Fluent.\n\n\nMongo Provider\n: MongoKitten provider for Vapor.\n\n\n\n\n\n\nKitura Provider\n: Use IBM's Kitura HTTP server in Vapor.\n\n\nSwiftyBeaver\n: Adds the powerful logging of SwiftyBeaver to Vapor.\n\n\nAPNS\n: Simple APNS Library for Vapor (Swift).\n\n\nVaporFCM\n: Simple FCM (iOS + Android Push Notifications) library built for Vapor in Swift.\n\n\nVaporS3Signer\n: Generate V4 Auth Header/Pre-Signed URL for AWS S3 REST API\n\n\nFlock\n: Automated deployment of Swift projects to servers\n\n\nVaporFlock\n: Use Flock to deploy Vapor applications\n\n\n\n\n\n\nVaporForms\n: Brings simple, dynamic and re-usable web form handling to Vapor.\n\n\nJobs\n: A minimalistic job/background-task system for Swift.\n\n\nHeimdall\n: An easy to use HTTP request logger.\n\n\n\n\nProviders\n\n\nVapor providers are a convenient way to add functionality to your Vapor projects. For a full list of providers, check out the \nvapor-provider\n tag on GitHub.\n\n\nAuthors\n\n\nTanner Nelson\n, \nLogan Wright\n, and the hundreds of members of Vapor.", + "text": "Vapor Documentation\n\n\nThis is the documentation for Vapor, a Web Framework for Swift that works on iOS, macOS, and Ubuntu; and all of the packages that Vapor offers.\n\n\nVapor is the most used web framework for Swift. It provides a beautifully expressive and easy to use foundation for your next website or API.\n\n\nGetting Started\n\n\nIf this is your first time using Vapor, head to the \nGetting Started\n section to install Swift and create your first app.\n\n\nLike Vapor?\n\n\nOur small team works hard to make Vapor awesome (and free). Support the framework by starring Vapor on GitHub or donating $1 monthly--it helps us a lot. Thanks!\n\n\n\n \n\n\n\n\n\n \n\n\n\n\nOther Sources\n\n\nHere are some other great places to find information about Vapor.\n\n\nAPI\n\n\nAuto-generated API documentation is located at \napi.vapor.codes\n.\n\n\nStack Overflow\n\n\nView or ask questions related to Vapor on Stack Overflow using the \nvapor\n tag.\n\n\nGitHub\n\n\nSource Code\n\n\nTo view the framework's source code and code documentation, visit \nVapor's GitHub\n.\n\n\nIssues\n\n\nTo view open bug reports and feature requests, or to create one, visit the \nissues\n tab on \nVapor's GitHub\n.\n\n\nPackages\n\n\nVapor is a modular framework built for a modular language. Code is split up into modules which are grouped to form packages. Packages can be added to your project by adding the package's Git url to your \nPackage.swift\n file. Once a package is included, all of its modules will be available to \nimport\n. You can read more about packages and modules in the Swift Package Manager \nconceptual overview\n. \n\n\nBelow is a list of packages and modules that come with or can be used by Vapor projects. Packages will have a link to their respective GitHub page.\n\n\nCore\n\n\nCore packages are maintained by the Vapor team. \n\n\nIncluded\n\n\nThe following packages are included with Vapor by default.\n\n\n\n\nTip\n\n\nThese packages can also be used individually\n\n\n\n\n\n\nVapor\n: Swift's most used web framework.\n\n\nAuth: User authentication and persistance.\n\n\nSessions: Secure, ephemeral cookie based data storage.\n\n\nCookies: HTTP cookies.\n\n\nRouting: Advanced router with type-safe parameterization.\n\n\n\n\n\n\nEngine\n: Core transport layers.\n\n\nHTTP: HTTP client and server.\n\n\nURI: URI parsing and serializing.\n\n\nWebSockets: Full-duplex communication channels over a single TCP connection.\n\n\nSMTP: Send email using Sendgrid and Gmail.\n\n\n\n\n\n\nMultipart\n: Fast, streaming, non-blocking multipart parser and serializer.\n\n\nMultipart: Parses and serializes \nmultipart/mixed\n.\n\n\nFormData: Parses and serializes \nmultipart/form-data\n.\n\n\n\n\n\n\nJSON\n: Conveniences for working with JSON in Swift.\n\n\nConsole\n: Swift wrapper for console IO and commands.\n\n\nTLS\n: Swift wrapper for CLibreSSL's new TLS.\n\n\nCrypto\n: Cryptography from LibreSSL and Swift.\n\n\nDigests: Hashing with and without authentication.\n\n\nCiphers: Encryption and decryption\n\n\nRandom: Pseudo and cryptographically secure randomness.\n\n\nBCrypt: Pure Swift implementation.\n\n\n\n\n\n\nNode\n: Data structure for easy type conversions.\n\n\nPolymorphic\n: Syntax for easily accessing values from common types like JSON.\n\n\nPath Indexable\n: A protocol for powerful subscript access of common types like JSON.\n\n\n\n\n\n\nCore\n: Core extensions, type-aliases, and functions that facilitate common tasks.\n\n\nSocks\n: Swift C Socket API wrapper.\n\n\nBits\n: Low level byte manipulation helpers\n\n\n\n\nProviders\n\n\nThese are officially supported packages for Vapor that are not included by default.\n\n\n\n\nFluent\n: Models, relationships, and querying for NoSQL and SQL databases.\n\n\nFluent Provider\n: Fluent provider for Vapor.\n\n\n\n\n\n\nMySQL\n: Robust MySQL interface for Swift.\n\n\nMySQL Driver\n: MySQL driver for Fluent.\n\n\nMySQL Provider\n: MySQL provider for Vapor.\n\n\n\n\n\n\nLeaf\n: An extensible templating language.\n\n\nLeaf Provider\n: Leaf provider for Vapor.\n\n\n\n\n\n\nRedis\n: Pure-Swift Redis client implemented from the original protocol spec.\n\n\nRedis Provider\n: Redis cache provider for Vapor.\n\n\n\n\n\n\nJWT\n: JSON Web Tokens in Swift.\n\n\nJWT Provider\n: JWT conveniences for Vapor.\n\n\n\n\n\n\n\n\nCommunity\n\n\nThese are packages maintained by community members that work great with Vapor.\n\n\n\n\nPostgreSQL\n: Robust PostgreSQL interface for Swift.\n\n\nPostgreSQL Driver\n: PostgreSQL driver for Fluent.\n\n\nPostgreSQL Provider\n: PostgreSQL provider for Vapor.\n\n\n\n\n\n\nMongoKitten\n: Native MongoDB driver for Swift, written in Swift\n\n\nMongo Driver\n: MongoKitten driver for Fluent.\n\n\nMongo Provider\n: MongoKitten provider for Vapor.\n\n\n\n\n\n\nKitura Provider\n: Use IBM's Kitura HTTP server in Vapor.\n\n\nSwiftyBeaver\n: Adds the powerful logging of SwiftyBeaver to Vapor.\n\n\nAPNS\n: Simple APNS Library for Vapor (Swift).\n\n\nVaporFCM\n: Simple FCM (iOS + Android Push Notifications) library built for Vapor in Swift.\n\n\nVaporS3Signer\n: Generate V4 Auth Header/Pre-Signed URL for AWS S3 REST API\n\n\nFlock\n: Automated deployment of Swift projects to servers\n\n\nVaporFlock\n: Use Flock to deploy Vapor applications\n\n\n\n\n\n\nVaporForms\n: Brings simple, dynamic and re-usable web form handling to Vapor.\n\n\nJobs\n: A minimalistic job/background-task system for Swift.\n\n\nHeimdall\n: An easy to use HTTP request logger.\n\n\n\n\nProviders\n\n\nVapor providers are a convenient way to add functionality to your Vapor projects. For a full list of providers, check out the \nvapor-provider\n tag on GitHub.\n\n\nAuthors\n\n\nTanner Nelson\n, \nLogan Wright\n, and the hundreds of members of Vapor.", "title": "Overview" }, { @@ -67,7 +67,7 @@ }, { "location": "/#providers", - "text": "These are officially supported packages for Vapor that are not included by default. Fluent : Models, relationships, and querying for NoSQL and SQL databases. Fluent Provider : Fluent provider for Vapor. MySQL : Robust MySQL interface for Swift. MySQL Driver : MySQL driver for Fluent. MySQL Provider : MySQL provider for Vapor. Leaf : An extensible templating language. Leaf Provider : Leaf provider for Vapor. Redbird : Pure-Swift Redis client implemented from the original protocol spec.. Redis Provider : Redis cache provider for Vapor. JWT : JSON Web Tokens in Swift. JWT Provider : JWT conveniences for Vapor.", + "text": "These are officially supported packages for Vapor that are not included by default. Fluent : Models, relationships, and querying for NoSQL and SQL databases. Fluent Provider : Fluent provider for Vapor. MySQL : Robust MySQL interface for Swift. MySQL Driver : MySQL driver for Fluent. MySQL Provider : MySQL provider for Vapor. Leaf : An extensible templating language. Leaf Provider : Leaf provider for Vapor. Redis : Pure-Swift Redis client implemented from the original protocol spec. Redis Provider : Redis cache provider for Vapor. JWT : JSON Web Tokens in Swift. JWT Provider : JWT conveniences for Vapor.", "title": "Providers" }, { @@ -287,38 +287,33 @@ }, { "location": "/getting-started/manual/", - "text": "Manual Quickstart\n\n\nLearn how to create a Vapor project \nwithout\n the Toolbox using just Swift 3 and the Swift Package Manager.\n\n\nThis document assumes that you have Swift 3.1 installed.\n\n\n\n\nTip\n\n\nIf you'd prefer to use the Toolbox, follow the toolbox guide \nhere\n.\n\n\n\n\nMake new project using SwiftPM\n\n\nOpen your terminal\n\n\n\n\nNote\n\n\nFor our example, we'll be using the Desktop folder.\n\n\n\n\ncd\n ~/Desktop\nmkdir Hello\n\ncd\n Hello\nswift package init --type executable\n\n\n\n\n\nYour folder should look like this:\n\n\n\u251c\u2500\u2500 Package.swift\n\u251c\u2500\u2500 Sources\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 main.swift\n\u2514\u2500\u2500 Tests\n\n\n\n\n\nEdit \nPackage.swift\n\n\nOpen your \nPackage.swift\n file:\n\n\nopen Package.swift\n\n\n\n\n\nAnd add Vapor as a dependency. Here's how your file will look.\n\n\nPackage.swift\n\n\nimport\n \nPackageDescription\n\n\n\nlet\n \npackage\n \n=\n \nPackage\n(\n\n \nname\n:\n \nHello\n,\n\n \ndependencies\n:\n \n[\n\n \n.\nPackage\n(\nurl\n:\n \nhttps://github.com/vapor/vapor.git\n,\n \nmajorVersion\n:\n \n2\n)\n\n \n]\n\n\n)\n\n\n\n\n\n\n\n\nWarning\n\n\nWe try to keep this document up to date, however, you can view latest releases \nhere\n.\n\n\n\n\nEdit \nmain.swift\n\n\nA simple hello world:\n\n\nimport\n \nVapor\n\n\n\nlet\n \ndrop\n \n=\n \nDroplet\n()\n\n\n\ndrop\n.\nget\n(\nhello\n)\n \n{\n \nreq\n \nin\n\n \nreturn\n \nHello Vapor\n\n\n}\n\n\n\ndrop\n.\nrun\n()\n\n\n\n\n\n\nCompile \n Run\n\n\nThe first \nbuild\n command can take a while to fetch dependencies.\n\n\nswift build\n.build/debug/Hello serve\n\n\n\n\n\n\n\nWarning\n\n\nIf different, replace \nHello\n above with the name of your executable (as defined in \nPackage.swift\n).\n\n\n\n\nProduction\n\n\nCompiling in Swift's release mode and setting Vapor's environment to production will make your app more secure and performant.\n\n\nswift build --configuration release\n.build/release/Hello serve --env\n=\nproduction\n\n\n\n\n\nView\n\n\nGo to your favorite browser and visit \nhttp://localhost:8080/hello", + "text": "Manual Quickstart\n\n\nLearn how to create a Vapor project \nwithout\n the Toolbox using just Swift 3 and the Swift Package Manager (SPM).\n\n\nThis document assumes that you have Swift 3.1 installed, if not please refer to \nSwift.org\n before you can continue.\n\n\n\n\nTip\n\n\nIf you'd prefer to use the Toolbox, follow the toolbox guide \nhere\n.\n\n\n\n\nMake new project using SwiftPM\n\n\nOpen your terminal\n\n\n\n\nNote\n\n\nFor our example, we'll be using the Desktop folder.\n\n\n\n\ncd\n ~/Desktop\nmkdir Hello\n\ncd\n Hello\nswift package init --type executable\n\n\n\n\n\nYour folder structure should look like this:\n\n\n\u251c\u2500\u2500 Package.swift\n\u251c\u2500\u2500 Sources\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 main.swift\n\u2514\u2500\u2500 Tests\n\n\n\n\n\nEdit \nPackage.swift\n\n\nOpen your \nPackage.swift\n file:\n\n\nopen Package.swift\n\n\n\n\n\nAnd add Vapor as a dependency. Here's how your \nPackage.swift\n should look like.\n\n\n// swift-tools-version:3.1\n\n\n\nimport\n \nPackageDescription\n\n\n\nlet\n \npackage\n \n=\n \nPackage\n(\n\n \nname\n:\n \nHello\n,\n\n \ndependencies\n:\n \n[\n\n \n.\nPackage\n(\nurl\n:\n \nhttps://github.com/vapor/vapor.git\n,\n \nmajorVersion\n:\n \n2\n)\n\n \n]\n\n\n)\n\n\n\n\n\n\n\n\nWarning\n\n\nWe try to keep this document up to date, however, you can view latest releases \nhere\n.\n\n\n\n\nEdit \nmain.swift\n\n\nA simple hello world:\n\n\nimport\n \nVapor\n\n\n\nlet\n \ndrop\n \n=\n \ntry\n \nDroplet\n()\n\n\n\ndrop\n.\nget\n(\nhello\n)\n \n{\n \nreq\n \nin\n\n \nreturn\n \nHello Vapor\n\n\n}\n\n\n\ntry\n \ndrop\n.\nrun\n()\n\n\n\n\n\n\nCompile \n Run (Development)\n\n\nThe first \nbuild\n command can take a while to fetch dependencies.\n\n\nswift build\n.build/debug/Hello serve\n\n\n\n\n\n\n\nWarning\n\n\nIf different, replace \nHello\n above with the name of your executable (as defined in \nPackage.swift\n).\n\n\n\n\nProduction\n\n\nCompiling in Swift's release mode and setting Vapor's environment to production will make your app more secure and performant.\n\n\nswift build --configuration release\n.build/release/Hello serve --env\n=\nproduction\n\n\n\n\n\nView\n\n\nGo to your favorite browser and visit \nhttp://localhost:8080/hello", "title": "Manual" }, { "location": "/getting-started/manual/#manual-quickstart", - "text": "Learn how to create a Vapor project without the Toolbox using just Swift 3 and the Swift Package Manager. This document assumes that you have Swift 3.1 installed. Tip If you'd prefer to use the Toolbox, follow the toolbox guide here .", + "text": "Learn how to create a Vapor project without the Toolbox using just Swift 3 and the Swift Package Manager (SPM). This document assumes that you have Swift 3.1 installed, if not please refer to Swift.org before you can continue. Tip If you'd prefer to use the Toolbox, follow the toolbox guide here .", "title": "Manual Quickstart" }, { "location": "/getting-started/manual/#make-new-project-using-swiftpm", - "text": "Open your terminal Note For our example, we'll be using the Desktop folder. cd ~/Desktop\nmkdir Hello cd Hello\nswift package init --type executable Your folder should look like this: \u251c\u2500\u2500 Package.swift\n\u251c\u2500\u2500 Sources\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 main.swift\n\u2514\u2500\u2500 Tests", + "text": "Open your terminal Note For our example, we'll be using the Desktop folder. cd ~/Desktop\nmkdir Hello cd Hello\nswift package init --type executable Your folder structure should look like this: \u251c\u2500\u2500 Package.swift\n\u251c\u2500\u2500 Sources\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 main.swift\n\u2514\u2500\u2500 Tests", "title": "Make new project using SwiftPM" }, { "location": "/getting-started/manual/#edit-packageswift", - "text": "Open your Package.swift file: open Package.swift And add Vapor as a dependency. Here's how your file will look.", + "text": "Open your Package.swift file: open Package.swift And add Vapor as a dependency. Here's how your Package.swift should look like. // swift-tools-version:3.1 import PackageDescription let package = Package ( \n name : Hello , \n dependencies : [ \n . Package ( url : https://github.com/vapor/vapor.git , majorVersion : 2 ) \n ] ) Warning We try to keep this document up to date, however, you can view latest releases here .", "title": "Edit Package.swift" }, - { - "location": "/getting-started/manual/#packageswift", - "text": "import PackageDescription let package = Package ( \n name : Hello , \n dependencies : [ \n . Package ( url : https://github.com/vapor/vapor.git , majorVersion : 2 ) \n ] ) Warning We try to keep this document up to date, however, you can view latest releases here .", - "title": "Package.swift" - }, { "location": "/getting-started/manual/#edit-mainswift", - "text": "A simple hello world: import Vapor let drop = Droplet () drop . get ( hello ) { req in \n return Hello Vapor } drop . run ()", + "text": "A simple hello world: import Vapor let drop = try Droplet () drop . get ( hello ) { req in \n return Hello Vapor } try drop . run ()", "title": "Edit main.swift" }, { - "location": "/getting-started/manual/#compile-run", + "location": "/getting-started/manual/#compile-run-development", "text": "The first build command can take a while to fetch dependencies. swift build\n.build/debug/Hello serve Warning If different, replace Hello above with the name of your executable (as defined in Package.swift ).", - "title": "Compile & Run" + "title": "Compile & Run (Development)" }, { "location": "/getting-started/manual/#production",