Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swiftapi/swift-starter
Starter template for Swift
https://github.com/swiftapi/swift-starter
Last synced: 28 days ago
JSON representation
Starter template for Swift
- Host: GitHub
- URL: https://github.com/swiftapi/swift-starter
- Owner: SwiftAPI
- Created: 2021-04-10T15:22:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T21:32:51.000Z (7 months ago)
- Last Synced: 2024-10-15T21:23:35.352Z (about 1 month ago)
- Language: PHP
- Homepage: https://swiftapi.github.io/swift-docs/
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CodeFactor](https://www.codefactor.io/repository/github/swiftapi/swift-starter/badge)](https://www.codefactor.io/repository/github/swiftapi/swift-starter)
[![Version](http://poser.pugx.org/swift-api/swift-starter/version)](https://packagist.org/packages/swift-api/swift-starter)
[![Latest Unstable Version](http://poser.pugx.org/swift-api/swift-starter/v/unstable)](https://packagist.org/packages/swift-api/swift-starter)
[![PHP Version Require](http://poser.pugx.org/swift-api/swift-starter/require/php)](https://packagist.org/packages/swift-api/swift-starter)# Getting started
## Install
https://packagist.org/packages/swift-api/swift-starter
```shell
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
```yaml
connection:
driver: mysqli
host: localhost
username: root
password: ''
database: myapp_db
port: 3306
prefix: prefix_
```
Init the database by running
```shell
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
```json
{
"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.
1. Rename in root services.yaml (this references to destination to the first part of the namespace)
2. Rename in App folder
3. Rename in app/config.yaml
4. Rename namespace of the HelloWorld controller or remove it