5.15.1 • Published 5 years ago

generator-swiftserver v5.15.1

Weekly downloads
26
License
Apache-2.0
Repository
github
Last release
5 years ago

generator-swiftserver

Build Status codecov Version DownloadsMonthly DownloadsTotal License Greenkeeper badge

This module is a Yeoman generator for creating REST webservices based on the Kitura web framework with the Swift language.

This generator and the Yeoman library runs on Node.js and generates a Swift 5.0 application.

Contents

  1. Prerequisites
  2. Installation
  3. Usage
  4. Generated Artifacts
  5. Development
  6. Testing
  7. Contributing

Prerequisites

To use this module, you will need Node.js and Swift 5.0 installed on your Linux or macOS system. You can get Node.js from https://nodejs.org and Swift 5.0 from https://swift.org/download.

You will also need the Yeoman command line utility yo installed in your global Node.js module directory.

To install yo, run:

npm install -g yo

Installation

To install generator-swiftserver, run:

npm install -g generator-swiftserver

Usage

To create a Swift Server Generator project with no models defined, run:

yo swiftserver

To add a data model to your generated project, cd to the new project directory and run:

yo swiftserver:<model>

For more information on data models, check out this guide on Kitura.io.

Options

You can also change how generator-swiftserver is invoked by choosing options:

yo swiftserver [options]
OptionTypeDescription
--initn/aGenerate basic default scaffold without prompting user for input.
--skip-buildn/aSkip building the generated application
--single-shotn/aCreates application without including generator metadata files
--bluemixJsonInvoke generator-swiftserver using a bluemix json object
--nameStringProject name
--typeStringGive a specific type of application to generate. (web, bff, scaffold, crud)
--metricsBooleanGenerate embedded metrics dashboard for project
--dockerBooleanGenerate Dockerfile for project
--healthcheckBooleanAdd health checking to project
--openapiBooleanAdd Kitura-OpenAPI to project
--specJsonInvoke generator-swiftserver using a spec json object

Run

To run the generated server, use: <project-dir>/.build/debug/<app-name>

Generated Artifacts

FilePurpose
DockerfileConfiguration file for the run container
Dockerfile-toolsConfiguration file for the tools container
LICENSELicense for generated project
Package.resolvedResults of dependency resolution from Swift Package Manager
Package.swiftSwift file containing dependencies and targets for project
README.mdInstructions for building, running, and deploying the project
Sources/*Folder containing project source files
Tests/*Folder containing project test files
chart/*Folder containing Kubernetes Helm Chart files for project
cli-config.ymlYaml file containing mappings for various commands, files, and settings, utilized by the cli commands
manifest.ymlYaml file containing various information for deployment to IBM Cloud
spec.jsonJSON file containing information about the project, used to generate the project
myProjectName.xcodeprojGenerated xcodeproj for project

Development

To get started with development, simply clone this repository and link it via npm:

git clone https://github.com/IBM-Swift/generator-swiftserver
cd generator-swiftserver
npm link

Testing

To run the unit tests, run:

npm test

Contributing

To contribute, you will need to fork the repository or branch off the develop branch.

Make sure to follow the conventional commit specification when contributing.

Once you are finished with your changes, run npm test to make sure all tests pass. Then, create a pull request against develop, and a team member will review and merge your pull request.

Once the pull request is merged, an auto generated pull request will be created against master to update the changelog and increase the versioning. After the auto-generated pull request has been merged to master, the version will be bumped and published to npm.

5.15.1

5 years ago

5.15.0

5 years ago

5.14.0

5 years ago

5.13.0

5 years ago

5.12.1

5 years ago

5.12.0

5 years ago

5.11.0

5 years ago

5.10.1

5 years ago

5.10.0

5 years ago

5.9.0

5 years ago

5.8.1

5 years ago

5.8.0

5 years ago

5.7.0

5 years ago

5.6.2

6 years ago

5.6.1

6 years ago

5.6.0

6 years ago

5.5.0

6 years ago

5.4.2

6 years ago

5.4.1

6 years ago

5.4.0

6 years ago

5.3.4

6 years ago

5.3.3

6 years ago

5.3.2

6 years ago

5.3.1

6 years ago

5.3.0

6 years ago

5.2.1

6 years ago

5.2.0

6 years ago

5.1.0

6 years ago

5.0.5

6 years ago

5.0.4

6 years ago

5.0.3

6 years ago

5.0.2

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.10.1

6 years ago

4.10.0

6 years ago

4.9.3

6 years ago

4.9.2

6 years ago

4.9.1

6 years ago

4.9.0

6 years ago

4.8.9

6 years ago

4.8.8

6 years ago

4.8.7

6 years ago

4.8.6

6 years ago

4.8.5

6 years ago

4.8.4

6 years ago

4.8.3

6 years ago

4.8.2

6 years ago

4.8.1

6 years ago

4.8.0

6 years ago

4.7.0

6 years ago

4.6.2

6 years ago

4.6.1

6 years ago

4.6.0

6 years ago

4.5.1

6 years ago

4.5.0

6 years ago

4.4.0

6 years ago

4.3.0

6 years ago

4.2.3

6 years ago

4.2.2

6 years ago

4.2.1

6 years ago

4.2.0

6 years ago

4.1.0

7 years ago

4.0.0

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.8.0

7 years ago

2.7.0

7 years ago

2.6.0

7 years ago

2.5.0

7 years ago

2.4.1

7 years ago

2.4.0

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago