To built your web-application with Swift you need to first install its framework. There are some Swift frameworks available
1: Vapor
2: Perfect
3: Kitura
Master branch of this repo is deployed on Heroko
. You can test the deployed apis by reading the Documentation .
But this repo used Swift with Vapor. To use vapor you need to have Vapor installed on your machine & Xcode should be installed too.
To install Vapor use bellow commands.
brew tap vapor/tap
brew install vapor/tap/vapor
Now go to your desired directory where you want to create a new Project. And paste the following command.
vapor new YourProjectName
Once that finishes, change into the newly created directory.
cd YourProjectName
Let's now use the Vapor Toolbox's Ccode command to generate an Xcode project. This will allow us to build and run our app from inside of Xcode, just like an iOS app.
vapor xcode
For creating database with PostgreSQL
and then below steps.
1: Download
2: Install
3: Initialze
After initialzing double click default database and it will open terminal
just paste below lines and your database will be created.
CREATE DATABASE YourDatabaseName;
Now in your configure.swift
file replace username
with your selected database name on which you have double clicked and database
name with YourDatabaseName.
To build either you can use command or Xcode’s Play button at the top left. (But you need to choose Run
from your provided targets.
Primary contributors for this repository are following. But we thanks to all of those who read/fork/raise an issue on this repo, because without there contribution we won't be able to stabalise it.
Click Here