Framadate v2 API backend en symfony. dépot miroir
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Tykayn 27621b093b add migration info 1 year ago
assets head and foot 2 years ago
bin Add first functional tests for Poll. 2 years ago
config update database config port and example in .env file 2 years ago
doc add migration info 1 year ago
public remove from git built assets 2 years ago
src add migration info 1 year ago
templates check dependencies 2 years ago
tests Fix client request on POST poll (new poll). 2 years ago
translations head and foot 2 years ago
.env add migration info 1 year ago
.env.test Add test for admin, fix issue on admin token parameter. 2 years ago
.gitignore ignore some public files, copy build 2 years ago
.gitmodules add submodule for frontend 2 years ago
.htaccess hop 3 years ago
LICENSE Mettre à jour LICENSE 2 years ago
README.md add migration info 1 year ago
composer-setup.php add graphql bundle 2 years ago
composer.json add graphql bundle 2 years ago
composer.lock database config 2 years ago
composer.phar add graphql bundle 2 years ago
package.json head and foot 2 years ago
phpunit.xml.dist Add first functional tests for Poll. 2 years ago
symfony.lock update database config port and example in .env file 2 years ago
update.sh add folder for sumbodule 2 years ago
webpack.config.js head and foot 2 years ago
yarn.lock head and foot 2 years ago

README.md

#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.

  • 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:

  • coordinate properties and paths to be more restful.

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
```#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.
* 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:
* coordinate properties and paths to be more restful.

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

***
### Requirements
You MUST have php version 7+ 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.
you can check that the database connection works with the command:
```bash  
php bin/console doctrine:schema:validate

Getting started

Migrating from V1

Follow the migration guide doc/migration.md

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

configure database access in .env.local file

This project can use any database system, we provide config for mysql.

If you need to setup mysql, a database and a user, read the database_creation doc. Before customizing your local environment config. the .env.local file will not be versionned by git, so no risk to set the mysql credentials in here as long as file access are well done.

You can copy the model env file and customize it last line to access mysql.

cp doc/env-example .env.local

look for the line like this

DATABASE_URL=mysql://framadate-admin:framadate-admin-password@127.0.0.1:5432/framadate-api

and change its values for framadate-admin , framadate-admin-password, framadate-api.

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