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

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up