I've a project builded in NodeJs
and what im trying to do is running using pywebview
library.
Pywebview
allow us to create a server and run the project using a WindowForm..
Example:
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<title>Document</title>
</head>
<body>
<div id="tvchart"></div>
</body>
<script src="https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js"></script>
<script src="index.js"></script>
</html>
app.py
import webview
webview.create_window('App', 'index.html', js_api=None, width=800, height=600, min_size=(200, 100))
webview.start(debug=True,http_server=True)
So, in this case using a simple HTML with some js and his dependecies running app.py
, it works perfectly, create a windowform and then show the HTML with all the js function.
But if this project is builded in NodeJs
i get some trouble.
Mainly i run a project NodeJs using the command line npm run dev
. so the command create a server like localhost/80
, but i dont know how to implement NodeJs
and pywebview
in the same project. Any suggestion?