File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export HMD_API_ACCESS_TOKEN=MY_ACCESS_TOKEN
3838Or in JSON file (` ~/.hackmd/config.json ` ):
3939``` json
4040{
41- "accesstoken " : " MY_ACCESS_TOKEN"
41+ "accessToken " : " MY_ACCESS_TOKEN"
4242}
4343```
4444### Set self-hosted API endpoint (optional)
@@ -67,7 +67,7 @@ All available configurations are listed in the table below.
6767| Config key | Environment Variable | Data Type | Example Value | Description |
6868| ------------ | :--------------------------------------------- | ----------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
6969| ` hackmdAPIEndpointURL ` | ` HMD_API_ENDPOINT_URL ` | * ` string ` * | ` https://my.hackmd-ee.api.endpoint ` | The self-hosted API endpoint URL |
70- | ` accesstoken ` | ` HMD_API_ACCESS_TOKEN ` | * ` string ` * | ` MY_ACCESS_TOKEN ` | Token to access HackMD APIs |
70+ | ` accessToken ` | ` HMD_API_ACCESS_TOKEN ` | * ` string ` * | ` MY_ACCESS_TOKEN ` | Token to access HackMD APIs |
7171
7272
7373## Commands
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ import API from '@hackmd/api'
22
33import config from './config'
44
5- export const APIClient = new API ( config . accesstoken as string , config . hackmdAPIEndpointURL )
5+ export const APIClient = new API ( config . accessToken as string , config . hackmdAPIEndpointURL )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const defaultConfig = {
1818
1919const envConfig = {
2020 hackmdAPIEndpointURL : process . env . HMD_API_ENDPOINT_URL ,
21- accesstoken : process . env . HMD_API_ACCESS_TOKEN
21+ accessToken : process . env . HMD_API_ACCESS_TOKEN
2222}
2323
2424// look for a readable config file; we can merge it with the env.
You can’t perform that action at this time.
0 commit comments