Swift Package Index


Generic Vapour Package to add Country data to ant database


  • The latest stable release is 0.1.6. Released 2 years ago.
  • The last commit to master was 2 years ago.

Swift Version Compatibility

  • 0.1.6 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.1.6 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

VaporCountries

Vapor package to add Country and Continent data to any database.

Import it into your project:

let package = Package(
    name: "TestVaporCountries",
    dependencies: [      
      //VaporCountries
        .package(url: "https://github.com/mihaelamj/VaporCountries.git", from: "0.1.0")
  ],
    targets: [
      .target(name: "App", dependencies: ["FluentSQLite", "FluentMySQL", "FluentPostgreSQL", "VaporCountries"]),
  ]
)

Usage (for MySQL) :

import VaporCountries

// in configure.swift
migrations.addVaporCountries(for: .mysql)

//in routes.swift
try addVaporCountriesRoutes(for: .mysql, router: router)

Usage (for PostgreSQL) :

import VaporCountries

// in configure.swift
migrations.addVaporCountries(for: .psql)

//in routes.swift
try addVaporCountriesRoutes(for: .psql, router: router)

Usage (for SQLite) :

import VaporCountries

// in configure.swift
migrations.addVaporCountries(for: .sqlite)

//in routes.swift
try addVaporCountriesRoutes(for: .sqlite, router: router)

Example project: https://github.com/mihaelamj/TestVaporCountries

Tutorial article on making a new Vapor Package https://mihaelamj.github.io/Making%20a%20New%20Vapor%20Package/