mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
Compare commits
2 Commits
924f114129
...
2634228af0
Author | SHA1 | Date | |
---|---|---|---|
2634228af0 | |||
a24d38ca4e |
20
README.md
20
README.md
@ -1,11 +1,8 @@
|
|||||||
#Funky Framadate API
|
#Funky Framadate API
|
||||||
Experimental REST backend in symfony 5 for Funky framadate frontend.
|
REST backend in symfony 5 for Funky framadate frontend.
|
||||||
https://framagit.org/framasoft/framadate/funky-framadate-front
|
https://framagit.org/framasoft/framadate/funky-framadate-front
|
||||||
|
|
||||||
Follow this guide to setup.
|
|
||||||
* run `composer install`
|
|
||||||
configure env by creating local env file
|
|
||||||
`cp .env .env.local` and edit the file variables to give access to database.
|
|
||||||
|
|
||||||
## TODO:
|
## TODO:
|
||||||
* coordinate properties and paths to be more restful.
|
* coordinate properties and paths to be more restful.
|
||||||
@ -14,7 +11,7 @@ return stack of votes when we want to get the configuration of one poll (see [do
|
|||||||
|
|
||||||
***
|
***
|
||||||
### Requirements
|
### Requirements
|
||||||
You MUST have php version 8+ and [Composer](https://getcomposer.org/download/), and a database like Mysql, or postgresql, or mongodb, or any database that Doctrine can handle.
|
You MUST have [php version 8+ (see installation doc)](doc/php-8-install.md) and [Composer](https://getcomposer.org/download/), and a database like Mysql, or postgresql, or mongodb, or any database that Doctrine can handle.
|
||||||
Setup access to database by creating a .env.local file, and fill the database user and password data.
|
Setup access to database by creating a .env.local file, and fill the database user and password data.
|
||||||
you can check that the database connection works with the command:
|
you can check that the database connection works with the command:
|
||||||
```bash
|
```bash
|
||||||
@ -22,11 +19,21 @@ php bin/console doctrine:schema:validate
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
Follow this guide to setup.
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
install dependencies with Composer
|
install dependencies with Composer
|
||||||
|
|
||||||
|
configure env by creating local env file
|
||||||
|
```
|
||||||
|
cp .env .env.local
|
||||||
|
```
|
||||||
|
and edit the file variables to give access to database.
|
||||||
|
|
||||||
|
Launch dev server with the "symfony" cli tool:
|
||||||
|
```
|
||||||
|
symfony serve
|
||||||
|
```
|
||||||
there are examples of request to make it all work in the [doc/examples.md](doc/examples.md).
|
there are examples of request to make it all work in the [doc/examples.md](doc/examples.md).
|
||||||
|
|
||||||
### Check prerequisites
|
### Check prerequisites
|
||||||
@ -50,6 +57,7 @@ configure env by creating local env file
|
|||||||
|
|
||||||
## TODO:
|
## TODO:
|
||||||
* coordinate properties and paths to be more restful.
|
* coordinate properties and paths to be more restful.
|
||||||
|
https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/
|
||||||
|
|
||||||
return stack of votes when we want to get the configuration of one poll (see [doc/examples.md](doc/examples.md))
|
return stack of votes when we want to get the configuration of one poll (see [doc/examples.md](doc/examples.md))
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ server {
|
|||||||
try_files $uri /index.php$is_args$args;
|
try_files $uri /index.php$is_args$args;
|
||||||
|
|
||||||
# Use Mozilla's guidelines for SSL/TLS settings
|
# Use Mozilla's guidelines for SSL/TLS settings
|
||||||
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
|
# https://mozilla.github.io/server-side-tls/ssl-config-generator/g
|
||||||
# NOTE: some settings below might be redundant
|
# NOTE: some settings below might be redundant
|
||||||
ssl_certificate /etc/letsencrypt/live/framadate-api.cipherbliss.com/fullchain.pem; # managed by Cert$
|
ssl_certificate /etc/letsencrypt/live/framadate-api.cipherbliss.com/fullchain.pem; # managed by Cert$
|
||||||
ssl_certificate_key /etc/letsencrypt/live/framadate-api.cipherbliss.com/privkey.pem; # managed by Ce$
|
ssl_certificate_key /etc/letsencrypt/live/framadate-api.cipherbliss.com/privkey.pem; # managed by Ce$
|
||||||
|
13
doc/php-8-install.md
Normal file
13
doc/php-8-install.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Installer PHP-8
|
||||||
|
|
||||||
|
D'abord il vous faut vous débarasser des versions précédentes de php (si vous ne lancez pas ce projet à partir de docker).
|
||||||
|
```bash
|
||||||
|
sudo apt purge php-common
|
||||||
|
```
|
||||||
|
|
||||||
|
Pour Ubuntu / Debian, utilisez le ppa suivant. Mettez à jour Apt, puis installez php et hop, vous avez la version 8.
|
||||||
|
```bash
|
||||||
|
sudo add-apt-repository ppa:ondrej/php
|
||||||
|
sudo apt install php8.0 php8.0-fpm php8.0-mysql php8.0-bcrypt nginx
|
||||||
|
|
||||||
|
```
|
@ -159,6 +159,9 @@
|
|||||||
"nikic/php-parser": {
|
"nikic/php-parser": {
|
||||||
"version": "v4.10.4"
|
"version": "v4.10.4"
|
||||||
},
|
},
|
||||||
|
"php": {
|
||||||
|
"version": "8.0"
|
||||||
|
},
|
||||||
"phpstan/phpdoc-parser": {
|
"phpstan/phpdoc-parser": {
|
||||||
"version": "0.4.14"
|
"version": "0.4.14"
|
||||||
},
|
},
|
||||||
@ -299,9 +302,6 @@
|
|||||||
"symfony/options-resolver": {
|
"symfony/options-resolver": {
|
||||||
"version": "v5.2.4"
|
"version": "v5.2.4"
|
||||||
},
|
},
|
||||||
"symfony/orm-pack": {
|
|
||||||
"version": "v2.1.0"
|
|
||||||
},
|
|
||||||
"symfony/polyfill-intl-grapheme": {
|
"symfony/polyfill-intl-grapheme": {
|
||||||
"version": "v1.22.1"
|
"version": "v1.22.1"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user