Skip to content

Neal-C/exploring_vapor

Repository files navigation

Exploring Vapor

Resources

Notes

  • built-in test framework
  • first class citizen ORM
  • first class citizen templating

Bugs

  • Default vapor template contains a security flaw
  • docker-compose.yml file from the initialization template was broken

Instructions

With docker

Fill environment variables

cp .env.example .env
docker compose up

Testing

Tests are in ./Tests/exploring_vaporTests/exploring_vaporTests.swift

To run tests:

docker compose -f docker-compose-test.yml up

Manual testing

Get all ninja scrolls

curl --request GET \
  --url http://localhost:8080/scroll -v | jq

Create a ninja scroll

curl --request POST \
  --url http://localhost:8080/scroll \
  --header 'Content-Type: application/json' \
  --data '{
	"jutsu": "Rasengan",
	"rank": "JONIN",
	"usage": "All purpose physical attack, suited as 0HKO move"
}' \
  -v | jq

About

Server side Swift. Yes you've read that right. You can do backend with Swift now

Topics

Resources

Stars

Watchers

Forks