DEV Community

Ajin-1597
Ajin-1597

Posted on

serve a plotfile with deno

Hi,

I am generating a matplotlib file (SVG or PNG) with a little typescript code.
The goal is to serve a simple onepage website with deno and display this file on that simple website.

There should be a button at that served page. When the button is clicked my deployed ts program generates a new plot and saves it at webspace.
A file server gives it to the dynamically served website, where the plot is displayed.

I have tried with pogos simple-server:

import { pogo } from './dependencies.ts'; // pogo
const server = pogo.server({ port : 3010 });
server.router.get('/', () => {
return 'Hello world!';
}
);
export default server;

Now, where is written 'Hello World!' the served plotfile should be displayed at that simple website.

I am really trying out these things and I am not familiar with dynamic websites.

Thanks for support :)

Top comments (0)