Skip to content

Simple Swift application used to demo build and deployment using AWS CodeBuild and CodeDeploy

Notifications You must be signed in to change notification settings

lucisuta/trainee-frontend

Repository files navigation

Trainee Frontend

Frontend demo application to be used with trainee-cdk.

Developed using Swift on Server and the Vapor framework (including the Leaf library).

Prerequisites

Follow the instructions on the official Vapor website to install the client application.

https://vapor.codes

On a Mac, you can use Homebrew to install the CLI using the following command.

brew install vapor

Generating Vapor Project

Run the Vapor new command.

vapor new trainee-frontend

The command will generate a trainee-frontend folder with this structure

  • trainee-frontend
    • Public - Files to be served to client without processing (images, CSS files)
    • Resources/Views - Leaf templates
    • Sources/App
      • Controllers - Controllers that handle routes defined in routes.swift
      • configure.swift
      • entrypoint.swift
      • routes.swift
    • Tests
    • docker-compose.yml
    • Dockerfile
    • Package.swift

Build and Run Application Locally

To build the application into an executable run the command

swift build 

To build and run the application

swift run

To build and run the unit tests

swift test

CodeBuild

The buildspec.yml configuration file is used to tell CodeBuild how to build this project and what the artifacts are.

CodeDeploy

The appspec.yml configuration file is used to tell CodeDeploy how to deploy artifacts and run the application in production. The configuration also makes use of the scripts found in the Scripts folder to manage the lifecycle of the application.

About

Simple Swift application used to demo build and deployment using AWS CodeBuild and CodeDeploy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published