Skip to content

Instantly share code, notes, and snippets.

View diegonobre's full-sized avatar

Diego Nobre diegonobre

View GitHub Profile
@diegonobre
diegonobre / package.json
Created July 28, 2021 17:54
Strapi.io FE + BE package.json npm-run-all wait-on cross-env
{
"name": "project.name",
"private": true,
"version": "0.0.0",
"scripts": {
"develop:backend": "yarn --cwd backend develop",
"develop:frontend": "wait-on http://localhost:1337/admin && yarn --cwd frontend develop",
"develop": "cross-env FORCE_COLOR=1 npm-run-all -l -p develop:*",
"heroku-prebuild": "cd backend && yarn",
"start": "cd backend && yarn start"

Keybase proof

I hereby claim:

  • I am diegonobre on github.
  • I am diegonobre (https://keybase.io/diegonobre) on keybase.
  • I have a public key ASDvAR8NJYfjuXCIFkKqJvTmTfyC2x1xebWyyTMyHBA5lAo

To claim this, I am signing this object:

@diegonobre
diegonobre / symfony3-rest-api.md
Last active January 5, 2024 14:36 — forked from tjamps/README.md
Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authenticationu
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :