Skip to content

Instantly share code, notes, and snippets.

@guyo13
guyo13 / echo-server.rs
Last active May 25, 2022 21:54
rtlambda example echo server
use rtlambda::prelude::*;
use serde::Serialize;
#[macro_use]
extern crate rtlambda;
// Create a struct representing the lambda's response.
#[derive(Serialize, Clone)]
struct EchoMessage {
msg: String,
req_id: String,
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout key.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl