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 :)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up