|
|
|
@ -106,6 +106,16 @@ class Example:
|
|
|
|
|
# Set the web directory, any .js file in that directory will be loaded by the frontend as a frontend extension
|
|
|
|
|
# WEB_DIRECTORY = "./somejs"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add custom API routes, using router
|
|
|
|
|
from aiohttp import web
|
|
|
|
|
from server import PromptServer
|
|
|
|
|
|
|
|
|
|
@PromptServer.instance.routes.get("/hello")
|
|
|
|
|
async def get_hello(request):
|
|
|
|
|
return web.json_response("hello")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# A dictionary that contains all nodes you want to export with their names
|
|
|
|
|
# NOTE: names should be globally unique
|
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
|
|
|