Skip to content

Commit ec3e005

Browse files
committed
Update README and .env.example
1 parent 84cbce5 commit ec3e005

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,22 @@ This is the source code of [ted2srt.org](https://ted2srt.org), a website to down
66

77
## Set up development environment
88

9-
### Frontend
9+
[Nix](https://nixos.org/nix/) is required for development.
1010

11-
Setup [purescript](https://github.com/purescript/purescript) and [pulp](https://github.com/purescript-contrib/pulp), then
11+
### Frontend
1212

1313
```
1414
cd frontend
15+
nix-shell
16+
spago build -w
1517
yarn
16-
pulp -w build
1718
yarn start
1819
```
1920

2021
Run `yarn build` once, so that backend can start correctly.
2122

2223
### Backend
2324

24-
First, setup [nix](https://nixos.org/nix/) and [stack](https://docs.haskellstack.org/en/stable/README/) the way you like.
25-
26-
Then
27-
2825
```
2926
cd backend
3027
nix-shell

backend/.env.example

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
export DEVELOPMENT=true
2-
export DB_NAME=ted2srt
3-
export DB_USER=postgres
4-
export DB_PASSWORD=postgres
2+
export DB_CONN_STRING=postgresql://postgres:postgres@localhost/ted2srt
53
export HOST=127.0.0.1
64
export PORT=3001
75
export REDIS_PORT=6379

backend/deploy/nginx.conf

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ http {
130130
limit_req_zone $binary_remote_addr zone=api:10m rate=2r/s;
131131

132132
server {
133+
listen 80;
134+
listen [::]:80;
133135
server_name www.ted2srt.org;
134136
return 301 $scheme://ted2srt.org$request_uri;
135137
}

frontend/shell.nix

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{ pkgs ? import ../nix/nixpkgs.nix {}
2+
, nonbili ? import (fetchTarball https://github.com/nonbili/nonbili-nix-deps/archive/4fc735c10a8eee4a5d044164621651b89d0d6782.tar.gz) { inherit pkgs; }
3+
}:
4+
5+
pkgs.mkShell {
6+
buildInputs = [
7+
nonbili.purs
8+
nonbili.spago
9+
nonbili.zephyr
10+
];
11+
}

0 commit comments

Comments
 (0)