Files
bsky-social-app/bskyweb
bryan newbold 034e6bdf66 bskyweb: basic i18n setup
Uses Cookies, then HTTP Accept-Language, then default, to negotiate
language setting.

The cookie name is 'lang', and the value can be any string which would
be valid in Accept-Language. This includes a trivial 2-char ISO code.

Language setting is returned as 2-char ISO code (though could be
more flexible in the future if needed).

HTML language is configured (attr), and a secondary per-language
scripts.html file is included.

As a hack Makefile generates the scripts_*.html files; typescript build
system will need to populate those appropriately as part of 'make
build-web' to finish integration.
2023-11-22 14:33:28 -08:00
..
2023-11-22 14:33:28 -08:00
2023-11-22 14:33:28 -08:00
2023-11-22 14:33:28 -08:00
2023-11-22 14:33:28 -08:00
2023-03-20 14:41:15 -07:00
2023-03-20 14:41:15 -07:00

Build / Develop

SPA Bundle (monolithic static javascript file)

To build the SPA bundle (bundle.web.js), first get a JavaScript development environment set up. Either follow the top-level README, or something quick like:

# install nodejs 18 (specifically)
nvm install 18
nvm use 18
npm install --global yarn

# setup tools and deps (in top level of this repo)
yarn install --frozen-lockfile

# run yarn web dev server, if you wanted
yarn web

Then build and copy over the big 'ol bundle.web.js file:

# in the top level of this repo
yarn build-web

Golang Daemon

Install golang. We are generally using v1.21+.

In this directory (bskyweb/):

# re-build and run daemon
go run ./cmd/bskyweb serve

# build and output a binary
go build -o bskyweb ./cmd/bskyweb/

The easiest way to configure the daemon is to copy example.env to .env and fill in auth values there.