From c54a127d3731dd5638099df771aa1e9ff2a5543e Mon Sep 17 00:00:00 2001 From: haskal Date: Sun, 26 Apr 2020 20:13:10 -0400 Subject: [PATCH] Initial setup --- .gitignore | 4 ++++ NOTES.md | 22 ++++++++++++++++++++++ backend | 5 +++++ scripts/nginx.conf | 38 ++++++++++++++++++++++++++++++++++++++ scripts/run-nginx.sh | 6 ++++++ 5 files changed, 75 insertions(+) create mode 100644 .gitignore create mode 100644 NOTES.md create mode 100755 backend create mode 100644 scripts/nginx.conf create mode 100755 scripts/run-nginx.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..350c7e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.zo +*.dep +/staging/ +/examples/ diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..204c952 --- /dev/null +++ b/NOTES.md @@ -0,0 +1,22 @@ +## User object + +endpoint: https://my.instance.tld/ + +required info + +- username +- icon +- summary + - mentions: class="u-url mention" + - hashtagges: rel="tag" + +generated info +- type: person +- name, preferredUsername +- pubkey +- inbox/sharedInbox +- outbox +- followers, following +- liked: null, featured: null +- contexts: activitystreams, security, as:Hashtag, as:sensitive, as:manuallyApprovesFollwers, + as:movedTo, toot, toot:Emoji, toot:focalPoint, toot:featured diff --git a/backend b/backend new file mode 100755 index 0000000..9b121d9 --- /dev/null +++ b/backend @@ -0,0 +1,5 @@ +#!/usr/bin/env racket +#lang racket +; vim: ft=racket + +(displayln "hello world") diff --git a/scripts/nginx.conf b/scripts/nginx.conf new file mode 100644 index 0000000..43771fb --- /dev/null +++ b/scripts/nginx.conf @@ -0,0 +1,38 @@ +worker_processes 1; +error_log stderr; +daemon off; +pid nginx.pid; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + types_hash_max_size 4096; + types_hash_bucket_size 128; + + sendfile on; + gzip on; + + keepalive_timeout 65; + + ssl_session_cache shared:le_nginx_SSL:10m; + ssl_session_timeout 1440m; + ssl_session_tickets off; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_prefer_server_ciphers off; + ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA"; + + access_log /dev/stdout; + + server { + listen 8080; + server_name localhost; + location / { + add_header content-type text/plain; + return 200 "hi"; + } + } +} diff --git a/scripts/run-nginx.sh b/scripts/run-nginx.sh new file mode 100755 index 0000000..e35b884 --- /dev/null +++ b/scripts/run-nginx.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +PARENT_DIR="$(dirname $THIS_DIR)" + +nginx -c "$THIS_DIR/nginx.conf" -p "$PARENT_DIR"