• Stars
    star
    227
  • Rank 175,964 (Top 4 %)
  • Language
    Go
  • License
    MIT License
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a microblog for lists

lists.sh

A microblog for lists.

comms

setup

  • golang v1.18

You'll also need some environment variables

export POSTGRES_PASSWORD="secret"
export DATABASE_URL="postgresql://postgres:secret@db/lists?sslmode=disable"
export LISTS_SSH_PORT=2222
export LISTS_WEB_PORT=3000
export LISTS_DOMAIN="lists.sh"
export LISTS_EMAIL="[email protected]"
export LISTS_PROTOCOL="http"

I just use direnv which will load my .env file.

development

db

I use docker-compose to standup a postgresql server. If you already have a server running you can skip this step.

Copy example .env

cp .env.example .env

Then run docker compose.

docker-compose up -d

Then create the database and migrate

make create
make migrate

build the apps

make build

run the apps

There are two apps: an ssh and web server.

./build/ssh

Default port for ssh server is 2222.

./build/web

Default port for web server is 3000.

subdomains

Since we use subdomains for blogs, you'll need to update your /etc/hosts file to accommodate.

# /etc/hosts
127.0.0.1 lists.test
127.0.0.1 erock.lists.test

Wildcards are not support in /etc/hosts so you'll have to add a subdomain for each blog in development. For this example you'll also want to change the domain env var to LISTS_DOMAIN=lists.test.

deployment

I use docker-compose for deployment. First you need .env.prod.

cp .env.example .env.prod

The production.yml file in this repo uses my docker hub images for deployment.

docker-compose -f production.yml up -d

If you want to deploy using your own domain then you'll need to edit the Caddyfile with your domain.

More Repositories

1

sentences

A multilingual command line sentence tokenizer in Golang
Go
435
star
2

neovimcraft

website that makes it easy to find neovim plugins
TypeScript
319
star
3

robodux

caching in redux made simple
TypeScript
101
star
4

cofx

A node and javascript library that helps developers describe side-effects as data in a declarative, flexible API.
TypeScript
94
star
5

starfx

A micro-mvc framework for react apps
TypeScript
85
star
6

nvim.sh

neovim plugin search from the terminal
Go
42
star
7

remix-middleware

express-like middleware system for your remix loaders and actions
TypeScript
36
star
8

mudicom

A python package that validates, reads, and extracts images from a DICOM file
Python
33
star
9

gen-readlines

Node.js generator-based line reader
TypeScript
25
star
10

lists-blog

the source for my blog at https://lists.sh
Makefile
23
star
11

use-cofx

declarative side-effects inside react with hooks
TypeScript
22
star
12

redux-cofx

declarative redux middleware for handling side-effects
TypeScript
12
star
13

language-csjs

CSJS syntax highlighter for Atom
CoffeeScript
12
star
14

gen-tester

Test generators with ease
JavaScript
10
star
15

deck-continuations

HTML
10
star
16

scopeify-html

Scope all CSS selectors in HTML
JavaScript
10
star
17

youhood

The neighborhood voting platform
TypeScript
9
star
18

code-nest

Indentation level of source code in popular javascript repositories on Github
JavaScript
8
star
19

react-cofx

Fetch data for a react component with a declarative side-effects library
TypeScript
7
star
20

postcss-scopeify-everything

Scopify all your CSS selectors
JavaScript
6
star
21

listifi

Create lists to share with everyone
TypeScript
6
star
22

electron-plugin-manager

Using atom-plugin-manager to install third-party plugins during runtime
JavaScript
5
star
23

redux-saga-creator

Create a fault-tolerant root saga from an object of sagas
TypeScript
5
star
24

starfx-examples

a modern approach to side-effect and state management for FE apps
TypeScript
4
star
25

redux-plugin

Something something plugins for react redux
JavaScript
3
star
26

redux-router-cofx

activate side-effects when location changes in connected-react-router
TypeScript
3
star
27

c-mysql-learning

MySQL C API, some C learnings
C
2
star
28

prose-blog

Makefile
2
star
29

redux-package-loader

Build packages for each react, redux feature
TypeScript
2
star
30

eslint-plugin-packages

Module boundary detection for local packages
JavaScript
2
star
31

redux-saga-ts

reference implementation of redux-saga using typescript
TypeScript
2
star
32

express-cofx-router

cofx router for express
TypeScript
2
star
33

generator-ts

yeoman generator for typescript libraries
JavaScript
2
star
34

redux-express-query

express-like middleware for your redux side-effects
TypeScript
1
star
35

tmp-expressjs-postgres

TypeScript
1
star
36

lint-workspaces

Linter for yarn workspaces
JavaScript
1
star
37

dcmdb-flask

dcmdb built using python, flask
Python
1
star
38

uss_api

United States of America State Information API
Python
1
star
39

dcmdb

DICOM Search Engine
JavaScript
1
star
40

vdom

playing around with my own vdom
TypeScript
1
star
41

homebrew-sentences

Tap for sentences cli
Ruby
1
star
42

sentdemo

Golang web application to demo sentence tokenization
JavaScript
1
star
43

olwizard.js

Get off my DOM!
JavaScript
1
star
44

postcss-scale-media-query

Scale media query `-width` by some percentage
JavaScript
1
star
45

neurosnap

1
star
46

async-flow-control

Demonstration of different asynchronous design patterns in javascript
HTML
1
star
47

ud_telegram_bot

Urban Dictionary Telegram Bot
JavaScript
1
star
48

rubot

idk my bff jill?
JavaScript
1
star
49

tmp-nextjs

JavaScript
1
star
50

dicom_codify

DICOM Standard 2014 Codified
Python
1
star
51

tslint-package-config

Some custom tslint rules
TypeScript
1
star