Giter Club home page Giter Club logo

demo's Introduction

API Platform

API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility and flexibility:

The official project documentation is available on the API Platform website.

API Platform embraces open web standards and the Linked Data movement. Your API will automatically expose structured data. It means that your API Platform application is usable out of the box with technologies of the semantic web.

It also means that your SEO will be improved because Google leverages these formats.

Last but not least, the server component of API Platform is built on top of the Symfony framework, while client components leverage React (Vue.js flavors are also available). It means that you can:

  • Use thousands of Symfony bundles and React components with API Platform.
  • Integrate API Platform in any existing Symfony, React, or Vue application.
  • Reuse all your Symfony and JavaScript skills, and benefit from the incredible amount of documentation available.
  • Enjoy the popular Doctrine ORM (used by default, but fully optional: you can use the data provider you want, including but not limited to MongoDB and Elasticsearch)

Install

Read the official "Getting Started" guide.

Credits

Created by Kévin Dunglas. Commercial support is available at Les-Tilleuls.coop.

demo's People

Contributors

aaa2000 avatar akiletour avatar alanpoulain avatar chris53897 avatar clementtalleu avatar coil avatar darthf1 avatar dependabot[bot] avatar drachenkaetzchen avatar dunglas avatar fbourigault avatar gregcop1 avatar jfcoz avatar mathieudewet avatar pauljosephkrogulec avatar pborreli avatar renrhaf avatar romaixn avatar roukmoute avatar sajadtorkamani avatar sethvargo avatar soyuka avatar strikerrus avatar tattali avatar teohhanhui avatar thcolin avatar tony-tran avatar toofff avatar vincentchalamon avatar wiese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demo's Issues

Why there is not getters and setters ?

In this demo all entities properties are public if they are not a relation with another entity. Did there is a particular reason ? Use getters and setters is not a best practice for all Symfony projects ?

Installation instructions missing

Unfortunately the repo does not have installation instructions (neither with or without docker). I am beginning to write a small documentation, however, I also don't know how to create the sample database. Can you give me a pointer on how to fill the sample database with the schema?

Remove Varnish?

I wonder would it possible to replace Varnish with Nginx cache configuration. Nginx doesn't support ESI - will be an issue?

I have an issue with using caching proxies while using Blackfire in Production. I'm also not sure if Nginx configuration with caching will solve it.

docker-compose up failed

I have this message with docker-compose up

    […]
    62/62:      https://codeload.github.com/twigphp/Twig/legacy.zip/7b604c89da162034bdf4bb66310f358d313dd16d
    Finished: success: 62, skipped: 0, failure: 0, total: 62
Package operations: 62 installs, 0 updates, 0 removals
  - Installing symfony/flex (v1.0.80): Loading from cache
Plugin installation failed, rolling back
  - Removing symfony/flex (v1.0.80)

                                                                                                                                                                                                                                                  
  [ErrorException]                                                                                                                                                                                                                                
  Declaration of Symfony\Flex\ParallelDownloader::getRemoteContents($originUrl, $fileUrl, $context) should be compatible with Composer\Util\RemoteFilesystem::getRemoteContents($originUrl, $fileUrl, $context, ?array &$responseHeaders = NULL)  
                                                                                                                                                                                                                                                  

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

ERROR: Service 'php' failed to build: The command '/bin/sh -c set -eux;         composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest;        composer clear-cache' returned a non-zero code: 1

Here is a screencast: https://asciinema.org/a/wzpPlhI6diBTCIjIHbYPAaHo7

Demo is down

Client demo returns 404 on /books/{id} API calls

How to configure only scheme https in link response header

Hello guys,

In my application, the link response header is only in Http. Which poses a mixed content problem. I want to use Https scheme

At what level to position this configuration (Nginx, Symfony, Api-Platform). Do you have an example ?

Thinks by advance for your help

image

Fixture data does not load

Upping the environment and running docker-compose exec php bin/console hautelook:fixtures:load results in these errors:

$ docker-compose exec php bin/console hautelook:fixtures:load
Careful, database will be purged. Do you want to continue y/N ?y
2019-01-23T21:10:41+00:00 [error] Error thrown while running command "hautelook:fixtures:load". Message: "An exception occurred while executing 'SELECT UUID_GENERATE_V4()':

SQLSTATE[42883]: Undefined function: 7 ERROR:  function uuid_generate_v4() does not exist
LINE 1: SELECT UUID_GENERATE_V4()
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts."

In AbstractPostgreSQLDriver.php line 79:
                                                                               
  An exception occurred while executing 'SELECT UUID_GENERATE_V4()':           
                                                                               
  SQLSTATE[42883]: Undefined function: 7 ERROR:  function uuid_generate_v4()   
  does not exist                                                               
  LINE 1: SELECT UUID_GENERATE_V4()                                            
                 ^                                                             
  HINT:  No function matches the given name and argument types. You might nee  
  d to add explicit type casts.                                                
                                                                               

In PDOConnection.php line 90:
                                                                               
  SQLSTATE[42883]: Undefined function: 7 ERROR:  function uuid_generate_v4()   
  does not exist                                                               
  LINE 1: SELECT UUID_GENERATE_V4()                                            
                 ^                                                             
  HINT:  No function matches the given name and argument types. You might nee  
  d to add explicit type casts.                                                
                                                                               

In PDOConnection.php line 88:
                                                                               
  SQLSTATE[42883]: Undefined function: 7 ERROR:  function uuid_generate_v4()   
  does not exist                                                               
  LINE 1: SELECT UUID_GENERATE_V4()                                            
                 ^                                                             
  HINT:  No function matches the given name and argument types. You might nee  
  d to add explicit type casts.                                                
                                                                               

hautelook:fixtures:load [-b|--bundle [BUNDLE]] [-m|--manager MANAGER] [--append] [--shard SHARD] [--purge-with-truncate] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>

deploy: demo not updated with last version

API Platform version(s) affected: master

Description
The demo https://demo.api-platform.com/ doesn't seem to include the last merged PR #162. We should see a new "TopBook" entity but it's not the case. http://localhost:8080/top_books we have a 404.

How to reproduce

https://demo.api-platform.com/top_books

Possible Solution
The deployment may have failed. Log?

Additional Context
No error message was raised during the auto deployment task:

 github-actions bot commented 22 hours ago
 API successfully deployed at https://demo.api-platform.com.
It may take a few minutes to be available.

Should have a more complex demo

I think the point loses with this oversimplified demo. It is just a CRUD API, and you map REST resources to ORM entities, which works only if an application has an anaemic domain model. On the other hand this is a great project and should be developed further.

Review.rating must be compulsory

"NOTICE: PHP message: [critical] Uncaught PHP Exception Doctrine\DBAL\Exception\NotNullConstraintViolationException: "An exception occurred while executing 'INSERT INTO reviews (id, body, rating, letter, author, publication_date, book_id) VALUES (?, ?, ?, ?, ?, ?, ?)' with params ["b76bd744-f98a-4f2e-ab75-c1fff05f6cb8", "bonjour", null, null, null, null, "002e7684-d79c-4f59-a06b-bb12d61cd022"]:"

SwaggerDecorator only works with Swagger, not with other docs

The SwaggerDecorator only works with Swagger, but its feature is needed in other docs (OpenApi, etc.).

Also, the SwaggerTest check the documentation generated at /, which uses the ContextBuilder, not the Swagger documentation.

Note: we may check with the core-team which documentations are still supported on API Platform 2.6, some may be deprecated.

Load FixturesBundle on require instead of require-dev

Fixtures are loaded on production, so why require them on dev only? It impacts the deploy process by forcing the use of the following script:

APP_ENV=dev composer install -n && bin/console d:m:m --no-interaction --env=prod && bin/console d:s:u --force --env=prod && bin/console hautelook:fixtures:load -n --env=dev && APP_ENV=prod composer --no-dev install --classmap-authoritative && echo deployed

This could be improved by loading the FixturesBundle on require and execute the fixtures:load command directly on production.

Add DataProvider and DataPersister

I'm trying to use DataPersister and DataProvider, but the services are not loaded, so it would be cool to get a working sample following the Design chapter from apiPlatform documentation

Implement redux structure

The idea is to implement a regular redux structure in this project, with a simple feature (a list of books) as an example.

To add:

  • Actions
  • Components
  • Reducers
  • Resources

Required by #55 (comment)

Fix admin build

Module not found: Can't resolve 'rdf-canonize-native' in '/home/travis/build/api-platform/demo/admin/node_modules/rdf-canonize/lib'

Fatal error: Interface 'Symfony\Component\Translation\TranslatorInterface' not found

docker-compose up fails to build php with following error:

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!
!!  Fatal error: Interface 'Symfony\Component\Translation\TranslatorInterface' not found in /srv/api/vendor/symfony/validator/Util/LegacyTranslatorProxy.php on line 21
!!
Script @auto-scripts was called via post-install-cmd

Sorry, it duplicates api-platform/api-platform#1113

Install & configure Mercure + Postgres PUB/SUB

API

  • Install symfony/messenger
  • Configure 2 connections: Postgres (Doctrine) & Mercure
  • Create Book::generateCover custom item operation
  • Send a message on Postgres connection on Book::generateCover operation
  • Consume this message which generates a cover (use a library which generates a big random image, this must use a lot of resources to check the performances)
  • Send the cover image on the Mercure connection
  • Add Behat tests

Client

  • Connect to Mercure
  • Display Book cover
  • Add e2e tests

Demo site JSON output

API Platform version(s) affected: 1.0.0

Description

I've been looking at the demo site deployed at https://demo.api-platform.com/

I noticed that on the GET /books endpoint whilst the JSON-LD output returns identifiers as "@ id", the plain JSON output doesn't look to return any IDs whatsoever.

It therefore seems as if impossible to actually use the plain JSON format endpoints as I'd have no IDs to pass to other endpoints?

This may be a configuration bug or possibly I'm missing something! :)

Cannot delete a resource in live demo

Steps to reproduce:

$ curl -D - -s -X DELETE "https://demo.api-platform.com/books/2" -H  "accept: application/json"
HTTP/2 500
date: Sun, 30 Jul 2017 11:06:12 GMT
content-type: application/problem+json; charset=utf-8
content-length: 122
set-cookie: __cfduid=d074e5de5bce897bc9de63740d76736a71501412772; expires=Mon, 30-Jul-18 11:06:12 GMT; path=/; domain=.api-platform.com; HttpOnly
x-powered-by: PHP/7.1.2
x-content-type-options: nosniff
x-frame-options: deny
cache-control: no-cache, private
link: <http://demo.api-platform.com/docs.jsonld>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"
x-varnish: 988692
age: 0
via: 1.1 varnish-v4
server: cloudflare-nginx
cf-ray: 3867d8e6d9c50a6c-LHR

{"type":"https:\/\/tools.ietf.org\/html\/rfc2616#section-10","title":"An error occurred","detail":"Internal Server Error"}

Expected behaviour: 200 OK response and the resource is deleted.

Behat fails

When I run behat, it fails because forward slashes are escaped:

Feature: Manage books and their reviews
  In order to manage books and their reviews
  As a client software developer
  I need to be able to retrieve, create, update and delete them trough the API.

  @createSchema
  Scenario: Create a book                                                                 # features/books.feature:8
    When I add "Content-Type" header equal to "application/ld+json"                       # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I add "Accept" header equal to "application/ld+json"                              # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I send a "POST" request to "/books" with body:                                    # Sanpi\Behatch\Context\RestContext::iSendARequestToWithBody()
      """
      {
        "isbn": "9781782164104",
        "title": "Persistence in PHP with the Doctrine ORM",
        "description": "This book is designed for PHP developers and architects who want to modernize their skills through better understanding of Persistence and ORM.",
        "author": "Kévin Dunglas",
        "publicationDate": "2013-12-01"
      }
      """
    Then the response status code should be 201                                           # Behat\MinkExtension\Context\MinkContext::assertResponseStatus()
    And the response should be in JSON                                                    # Sanpi\Behatch\Context\JsonContext::theResponseShouldBeInJson()
    And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" # Sanpi\Behatch\Context\RestContext::theHeaderShouldBeEqualTo()
    And the JSON should be equal to:                                                      # Sanpi\Behatch\Context\JsonContext::theJsonShouldBeEqualTo()
      """
      {
        "@context": "/contexts/Book",
        "@id": "/books/1",
        "@type": "http://schema.org/Book",
        "id": 1,
        "isbn": "9781782164104",
        "description": "This book is designed for PHP developers and architects who want to modernize their skills through better understanding of Persistence and ORM.",
        "author": "K\u00e9vin Dunglas",
        "title": "Persistence in PHP with the Doctrine ORM",
        "publicationDate": "2013-12-01T00:00:00+00:00"
      }
      """
      The json is equal to:
      {
          "@context": "\/contexts\/Book",
          "@id": "\/books\/1",
          "@type": "http:\/\/schema.org\/Book",
          "id": 1,
          "isbn": "9781782164104",
          "description": "This book is designed for PHP developers and architects who want to modernize their skills through better understanding of Persistence and ORM.",
          "author": "K\u00e9vin Dunglas",
          "title": "Persistence in PHP with the Doctrine ORM",
          "publicationDate": "2013-12-01T00:00:00+01:00"
      } (Behat\Mink\Exception\ExpectationException)

  Scenario: Retrieve the book list                                                        # features/books.feature:39
    When I add "Accept" header equal to "application/ld+json"                             # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I send a "GET" request to "/books"                                                # Sanpi\Behatch\Context\RestContext::iSendARequestTo()
    Then the response status code should be 200                                           # Behat\MinkExtension\Context\MinkContext::assertResponseStatus()
    And the response should be in JSON                                                    # Sanpi\Behatch\Context\JsonContext::theResponseShouldBeInJson()
    And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" # Sanpi\Behatch\Context\RestContext::theHeaderShouldBeEqualTo()
    And the JSON should be equal to:                                                      # Sanpi\Behatch\Context\JsonContext::theJsonShouldBeEqualTo()
      """
      {
        "@context": "/contexts/Book",
        "@id": "/books",
        "@type": "hydra:Collection",
        "hydra:member": [
          {
            "@id": "/books/1",
            "@type": "http://schema.org/Book",
            "id": 1,
            "isbn": "9781782164104",
            "description": "This book is designed for PHP developers and architects who want to modernize their skills through better understanding of Persistence and ORM.",
            "author": "K\u00e9vin Dunglas",
            "title": "Persistence in PHP with the Doctrine ORM",
            "publicationDate": "2013-12-01T00:00:00+00:00"
          }
        ],
        "hydra:totalItems": 1
      }
      """
      The json is equal to:
      {
          "@context": "\/contexts\/Book",
          "@id": "\/books",
          "@type": "hydra:Collection",
          "hydra:member": [
              {
                  "@id": "\/books\/1",
                  "@type": "http:\/\/schema.org\/Book",
                  "id": 1,
                  "isbn": "9781782164104",
                  "description": "This book is designed for PHP developers and architects who want to modernize their skills through better understanding of Persistence and ORM.",
                  "author": "K\u00e9vin Dunglas",
                  "title": "Persistence in PHP with the Doctrine ORM",
                  "publicationDate": "2013-12-01T00:00:00+01:00"
              }
          ],
          "hydra:totalItems": 1
      } (Behat\Mink\Exception\ExpectationException)

  Scenario: Throw errors when a post is invalid                                           # features/books.feature:67
    When I add "Content-Type" header equal to "application/ld+json"                       # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I add "Accept" header equal to "application/ld+json"                              # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I send a "POST" request to "/books" with body:                                    # Sanpi\Behatch\Context\RestContext::iSendARequestToWithBody()
      """
      {
        "isbn": "1312",
        "title": "",
        "description": "Yo!",
        "author": "Me!",
        "publicationDate": "2016-01-01"
      }
      """
    Then the response status code should be 400                                           # Behat\MinkExtension\Context\MinkContext::assertResponseStatus()
    And the response should be in JSON                                                    # Sanpi\Behatch\Context\JsonContext::theResponseShouldBeInJson()
    And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" # Sanpi\Behatch\Context\RestContext::theHeaderShouldBeEqualTo()
    And the JSON should be equal to:                                                      # Sanpi\Behatch\Context\JsonContext::theJsonShouldBeEqualTo()
      """
      {
        "@context": "/contexts/ConstraintViolationList",
        "@type": "ConstraintViolationList",
        "hydra:title": "An error occurred",
        "hydra:description": "isbn: This value is neither a valid ISBN-10 nor a valid ISBN-13.\ntitle: This value should not be blank.",
        "violations": [
          {
            "propertyPath": "isbn",
            "message": "This value is neither a valid ISBN-10 nor a valid ISBN-13."
          },
          {
            "propertyPath": "title",
            "message": "This value should not be blank."
          }
        ]
      }
      """

  Scenario: Add a review                                                                  # features/books.feature:103
    When I add "Content-Type" header equal to "application/ld+json"                       # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I add "Accept" header equal to "application/ld+json"                              # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I send a "POST" request to "/reviews" with body:                                  # Sanpi\Behatch\Context\RestContext::iSendARequestToWithBody()
      """
      {
        "rating": 5,
        "body": "Must have!",
        "author": "Foo Bar",
        "publicationDate": "2016-01-01",
        "book": "/books/1"
      }
      """
    Then the response status code should be 201                                           # Behat\MinkExtension\Context\MinkContext::assertResponseStatus()
    And the response should be in JSON                                                    # Sanpi\Behatch\Context\JsonContext::theResponseShouldBeInJson()
    And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" # Sanpi\Behatch\Context\RestContext::theHeaderShouldBeEqualTo()
    And the JSON should be equal to:                                                      # Sanpi\Behatch\Context\JsonContext::theJsonShouldBeEqualTo()
      """
      {
        "@context": "/contexts/Review",
        "@id": "/reviews/1",
        "@type": "http://schema.org/Review",
        "id": 1,
        "rating": 5,
        "body": "Must have!",
        "book": "/books/1",
        "author": "Foo Bar",
        "publicationDate": "2016-01-01T00:00:00+00:00"
      }
      """
      The json is equal to:
      {
          "@context": "\/contexts\/Review",
          "@id": "\/reviews\/1",
          "@type": "http:\/\/schema.org\/Review",
          "id": 1,
          "rating": 5,
          "body": "Must have!",
          "book": "\/books\/1",
          "author": "Foo Bar",
          "publicationDate": "2016-01-01T00:00:00+01:00"
      } (Behat\Mink\Exception\ExpectationException)

  @dropSchema
  Scenario: Get reviews by book                                                           # features/books.feature:135
    When I add "Accept" header equal to "application/ld+json"                             # Sanpi\Behatch\Context\RestContext::iAddHeaderEqualTo()
    And I send a "GET" request to "/reviews?book=/books/1"                                # Sanpi\Behatch\Context\RestContext::iSendARequestTo()
    Then the response status code should be 200                                           # Behat\MinkExtension\Context\MinkContext::assertResponseStatus()
    And the response should be in JSON                                                    # Sanpi\Behatch\Context\JsonContext::theResponseShouldBeInJson()
    And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" # Sanpi\Behatch\Context\RestContext::theHeaderShouldBeEqualTo()
    And the JSON should be equal to:                                                      # Sanpi\Behatch\Context\JsonContext::theJsonShouldBeEqualTo()
      """
      {
          "@context": "/contexts/Review",
          "@id": "/reviews",
          "@type": "hydra:Collection",
          "hydra:member": [
              {
                  "@id": "/reviews/1",
                  "@type": "http://schema.org/Review",
                  "id": 1,
                  "rating": 5,
                  "body": "Must have!",
                  "book": "/books/1",
                  "author": "Foo Bar",
                  "publicationDate": "2016-01-01T00:00:00+00:00"
              }
          ],
          "hydra:totalItems": 1,
          "hydra:view": {
              "@id": "/reviews?book=%2Fbooks%2F1",
              "@type": "hydra:PartialCollectionView"
          },
          "hydra:search": {
              "@type": "hydra:IriTemplate",
              "hydra:template": "/reviews{?}",
              "hydra:variableRepresentation": "BasicRepresentation",
              "hydra:mapping": []
          }
      }
      """
      The json is equal to:
      {
          "@context": "\/contexts\/Review",
          "@id": "\/reviews",
          "@type": "hydra:Collection",
          "hydra:member": [
              {
                  "@id": "\/reviews\/1",
                  "@type": "http:\/\/schema.org\/Review",
                  "id": 1,
                  "rating": 5,
                  "body": "Must have!",
                  "book": "\/books\/1",
                  "author": "Foo Bar",
                  "publicationDate": "2016-01-01T00:00:00+01:00"
              }
          ],
          "hydra:totalItems": 1,
          "hydra:view": {
              "@id": "\/reviews?book=%2Fbooks%2F1",
              "@type": "hydra:PartialCollectionView"
          },
          "hydra:search": {
              "@type": "hydra:IriTemplate",
              "hydra:template": "\/reviews{?}",
              "hydra:variableRepresentation": "BasicRepresentation",
              "hydra:mapping": []
          }
      } (Behat\Mink\Exception\ExpectationException)

--- Failed scenarios:

    features/books.feature:8
    features/books.feature:39
    features/books.feature:103
    features/books.feature:135

5 scenarios (1 passed, 4 failed)
33 steps (29 passed, 4 failed)
0m0.82s (29.30Mb)

Cannot log in the admin

API Platform version(s) affected: online demo

Description

I can't log in the online demo admin

How to reproduce

  1. go to https://demo-admin.api-platform.com/
  2. Enter username and password from the hint
  3. click on "sign in"

The result is a red toast message with the message "Authentication failed, please retry".

Invalid CORS header

Chrome console says:

Fetch API cannot load https://demo.api-platform.com/index.jsonld. Response to preflight request
doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains the invalid
value 'null'. Origin 'http://localhost:3000' is therefore not allowed access.

Access-Control-Allow-Origin should be * to call the API from everywhere. @dunglas can you please fix ?

Add project name label in namespace

In ci/deploy script:

cat <<EOF | kubectl create -f -
{
  "kind": "Namespace",
  "apiVersion": "v1",
  "metadata": {
	"name": "$NAMESPACE",
	"labels": {
		"name": "$NAMESPACE",
		"project": "true"
	}
  }
}
EOF

...to...

cat <<EOF | kubectl create -f -
{
  "kind": "Namespace",
  "apiVersion": "v1",
  "metadata": {
	"name": "$NAMESPACE",
	"labels": {
		"name": "$NAMESPACE",
		"project": "$PROJECT_NAME"
	}
  }
}
EOF

This will allow to deploy multiple projects to the same cluster, and prevent deleting other projects namespaces on cleanup

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.