Skip to content

Commit 24ad615

Browse files
committed
add installation section
1 parent 13668d2 commit 24ad615

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,55 @@ I intend to use this website for years to come, so I consider the extra effort w
4646

4747
## Installation
4848

49+
#### Environment variables
50+
51+
In development you can see draft posts by default.
52+
53+
```bash
54+
# .env.development
55+
56+
# this var is always without trailing slash '/'
57+
SITE_URL=http://localhost:3000
58+
```
59+
60+
```bash
61+
# .env.production
62+
63+
SITE_URL=https://nemanjamitic.com
64+
65+
# set to true to preview draft posts in production
66+
PREVIEW_MODE=
67+
```
68+
69+
#### Development
70+
71+
```bash
72+
# install packages
73+
yarn install
74+
75+
# copy and set environment variables
76+
cp .env.development.example .env.development
77+
78+
# run development server and visit http://localhost:3000
79+
yarn dev
80+
81+
# delete node_modules and yarn.lock
82+
yarn clean
83+
```
84+
85+
#### Production
86+
87+
```bash
88+
# copy and set environment variables
89+
cp .env.production.example .env.production
90+
91+
# build website
92+
yarn build
93+
94+
# run website and visit http://localhost:3000
95+
yarn start
96+
```
97+
4998
## Implementation details
5099

51100
## Deployment
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)