swift-api / swift-starter
Easy starter project for Swift
v0.2.18
2024-05-07 21:32 UTC
Requires
- php: >=8.2.0
- swift-api/swift: v0.2.18
README
Getting started
Install
https://packagist.org/packages/swift-api/swift-starter
composer create-project swift-api/swift-starter project_name
Init database
Make sure to fill out login detail to a database in /etc/config/database.yaml
connection: driver: mysqli host: localhost username: root password: '' database: myapp_db port: 3306 prefix: prefix_
Init the database by running
php bin/console database:entities:update
Setup app details
Fill out /etc/config/app.yaml. Make sure to add the right baseurl, otherwise routing won't work.
All set!
Visit your site site app-domain/hello-world and you should get the following response
{ "message": "Hey legend! Let's get started at https://henrivantsant.github.io/swift-docs/" }
From here you can rename the references from MyApp to your own namespace and get going.
- Rename in root services.yaml (this references to destination to the first part of the namespace)
- Rename in App folder
- Rename in app/config.yaml
- Rename namespace of the HelloWorld controller or remove it