Skip to content

swift-on-server/swift-org-deployment-guide-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example projects for the deployment guides

This repository contains example projects for the swift.org deployment guides.

hummingbird-docker

A basic Todo app written using the Hummingbird framework and a local PostgreSQL database. The app connects to the database using a secure connection.

# generate certificates and keys
cd hummingbird-docker/docker/certificates/
./generate.sh

cd ../..
# run the services
docker-compose up

vapor-docker

A basic Todo app written using the Vapor framework and a local PostgreSQL database. The app connects to the database using a secure connection.

# generate certificates and keys
cd vapor-docker/docker/certificates/
./generate.sh

cd ../..

# run the services
docker-compose up db server
# run migrations
docker-compose run migrations

Notes

Re-configure database service:

docker compose down --volumes && docker compose up db --build db

Create a Todo using cURL:

curl -X POST http://localhost:8080/todos \
-H "Content-Type: application/json" \
-d '{"title": "Buy milk"}'

About

This repository contains example projects for the swift.org deployment guides.

Resources

Stars

Watchers

Forks