Skip to content

Instantly share code, notes, and snippets.

@ShaiYer
ShaiYer / flask_app.py
Created June 7, 2022 07:22
Flask serve Angular 2+ App
@bp.route('/<path:path>')
def catch_all(path):
print('You want path: %s' % path)
return index_app()
def index_app():
cur_path = ''
f = open(cur_path + "static/apps/todo/index.html", "r")
file_text = f.read()
@ShaiYer
ShaiYer / index.html
Created January 10, 2022 09:50
React-Router Demo
<div id="root">
@ShaiYer
ShaiYer / index.html
Created January 10, 2022 09:50
React-Router Demo
<div id="root">
@ShaiYer
ShaiYer / angular-proxy.md
Last active October 26, 2023 07:29
Angular Proxy for API CORS

Generate Proxy for development environment to avoid CORS issues

  • Create file src/proxy.conf.json in the root of the Angular App / Project
  • Define proxy configuration values in angular.json

angular.json

@ShaiYer
ShaiYer / ScrollToTop-ng10.md
Created November 25, 2020 12:41
Scroll To Top Button - angular 10

Button scroll to top to a web site - Angular 10 Component

Add a Scroll to top button when scrolling down.

How to use

Basic use with the default values

@ShaiYer
ShaiYer / RESTful-best-practice.md
Last active May 3, 2024 12:17
RESTful API - best practices

RESTful API best practices guide - by Shai Yerushalmi

Web API’s is a web development architecture which decoupling the client GUI from the database and the server’s logic. This architecture enables to serve the same interface to multiple clients running on various platforms. Also, the same application can communicate with multiple interfaces.

REST stands for Representational state transfer and its a stateless protocol over HTTP that provides the interactions with the resources stored in the database which contains four basic CRUD actions - Create, Read, Update and Delete.

Each CRUD interaction can be defined by combinations of the following: