Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Starter code for A sample using native code that communicates with a plugin via websocket #50 #53

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions io-websocket-fastapi-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This readme gonna be updated
9 changes: 9 additions & 0 deletions io-websocket-fastapi-example/plugin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<script src="index.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
4 changes: 4 additions & 0 deletions io-websocket-fastapi-example/plugin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const app = require('photoshop').app;
const doc = app.activeDocument

doc.title = "Change me"
11 changes: 11 additions & 0 deletions io-websocket-fastapi-example/plugin/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Photoshop UXP Starter Script",
"id": "com.adobe.photoshop.uxp_script",
"version": "0.1.0",
"main": "index.html",
"host": {
"app": "PS",
"minVersion": "21.0.0"
},
"runOnStartup": true
}
8 changes: 8 additions & 0 deletions io-websocket-fastapi-example/server/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from fastapi import FastAPI

app = FastAPI()


@app.get("/")
async def root():
return {"message": "Hello World"}
2 changes: 2 additions & 0 deletions io-websocket-fastapi-example/server/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fastapi
uvicorn