CORS

Batman was annoyed on getting a CORS error whenever he tried to access the API.

Scaling the Application

You can allow CORS for your application by adding the following code:

Request

GET
/hello_world
  from robyn import Robyn, ALLOW_CORS

  app = Robyn(__file__)
  ALLOW_CORS(app, origins = ["http://localhost:<PORT>/"])

What's next?

After fixing the CORS issues. Batman was satisfied but he wanted to learn about ways to have small frontend pages in the server itself.

Robyn told him about templates and how he can use them to render HTML pages.