1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00
Framadate v2 API backend en symfony. dépot miroir
Go to file
2020-05-23 18:37:09 +02:00
bin Add first functional tests for Poll. 2020-05-08 23:00:57 +02:00
config Add test for admin, fix issue on admin token parameter. 2020-05-23 16:31:59 +02:00
doc hop 2020-01-23 15:19:07 +00:00
public hop 2020-01-23 15:19:07 +00:00
src Add test on Comment, test on DELETE does not work as how route works is unclear, fix requirement constraint name on CommentController. 2020-05-23 18:35:45 +02:00
templates use html full templates 2020-04-16 18:23:50 +02:00
tests Fix client request on POST poll (new poll). 2020-05-23 18:37:09 +02:00
.env env 2020-04-25 15:52:21 +02:00
.env.production hop 2020-01-23 15:19:07 +00:00
.env.test Add test for admin, fix issue on admin token parameter. 2020-05-23 16:31:59 +02:00
.gitignore Add first functional tests for Poll. 2020-05-08 23:00:57 +02:00
.gitmodules hop 2020-01-23 15:19:07 +00:00
.htaccess hop 2020-01-23 15:19:07 +00:00
composer.json Add first functional tests for Poll. 2020-05-08 23:00:57 +02:00
composer.lock Add first functional tests for Poll. 2020-05-08 23:00:57 +02:00
phpunit.xml.dist Add first functional tests for Poll. 2020-05-08 23:00:57 +02:00
README.md Update requirements for install. 2020-04-25 16:44:17 +02:00
symfony.lock Add first functional tests for Poll. 2020-05-08 23:00:57 +02:00
update.sh hop 2020-01-23 15:19:07 +00:00

#Funky Framadate API Experimental REST backend in symfony 4 for Funky framadate frontend. https://framagit.org/framasoft/framadate/funky-framadate-front

Follow this guide to setup.

TODO:

return stack of votes when we want to get the configuration of one poll (see doc/examples.md)


Requirements

You MUST have php version 7+ and Composer, 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. you can check that the database connection works with the command:

php bin/console doctrine:schema:validate

Getting started

Development

install dependencies with Composer

there are examples of request to make it all work in the doc/examples.md.

Check prerequisites

composer check-platform-reqs

install the vendors

composer install

initiate the database with fixtures

php bin/console doctrine:schema:drop --force
php bin/console doctrine:schema:create
php bin/console doctrine:fixtures:load --no-interaction --purge-with-truncate

launch local server with

php bin/console server:run

Production

set a virtual host on your server, configure CORS access to have the API to work. configure database access in a .env.local file , replace variables DATABASE_URL=mysql://database_user:db_user_password@127.0.0.1:3306/database_name this file is not versionned and should stay like this.

cronjob to delete expired polls

add this line in your crontab to run the clearance of expired polls everyday at 0h00.

0 0 * * * wget http://MYWEBSITE/api/v1/poll/clean-polls 

you can open your crontabl in command line with :

crontab -e

About

made by B. Lemoine, aka Tykayn, for the framadate funky front end project, a polling libre software.

contacts