ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
nada-nix install redis | |
redis-server --port 16379 --bind $IP | |
./redis-cli -h $IP -p 16379 | |
//Persistent | |
echo "bind $IP\nport 16379" > redis.conf |
ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.
You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :
The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
# Author : Sohail Salehi <info@soolan.com> | |
# | |
# Hello. My name is Sohail Salehi and I am a fullstack web developer. | |
# I would love to bring years of my experience to your projects. | |
# remote/onsite projects are welcome. | |
# Please check my CV and let me know if I could be any help. | |
# http://soolan.com | |
Install postgresql under debian: |
import React, { Component } from 'react'; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { deger: 0 } | |
this.arttirFunction = this.arttirFunction.bind(this) | |
} | |
arttirFunction() { | |
this.setState({ deger: this.state.deger + 1 }) | |
} |
SELECT | |
p.*, | |
(SELECT GROUP_CONCAT(rel.grup_tag_admin_name) FROM product_grup_tag_relation AS rel WHERE p.admin_name = rel.product_admin_name) AS gan, | |
(SELECT ei.thumb_path FROM product_images AS ei WHERE ei.product_admin_name = p.admin_name ORDER BY ei.cover DESC LIMIT 1) AS thumb_path | |
FROM product AS p | |
WHERE p.lang='tr' | |
GROUP BY p.id | |
DESC | |
HAVING gan LIKE '%5ad217158154e%' |
To start writing RestFull API in symfony we will need bundles:
"friendsofsymfony/oauth-server-bundle": "^1.6",
"friendsofsymfony/rest-bundle": "^2.7",
"friendsofsymfony/user-bundle": "^2.1",
"jms/serializer-bundle": "^3.5",
"nelmio/api-doc-bundle": "^3.5",
"sensio/framework-extra-bundle": "^5.2",
"symfony/apache-pack": "^1.0",