🚀 Express RESTful API Using TypeScript

1
2
| $ npm install -g typescript-express-starter
$ npx typescript-express-starter "project name"
|
然后 npm run dev
就可以跑了。
1
2
| $ npm install axios --save
$ npm install cheerio --save
|
根据需求编写代码。
1
2
3
| $ ssh-keygen -C '记号' -f ~/.ssh/deploy_key
$ cat ~/.ssh/deploy_key.pub
# 将公钥写入仓库的 `Deploy keys`
|
vim ~/.ssh/config
,输入内容:
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/deploy_key
ssh -T [email protected]
测试连通性。
1
2
3
4
| $ git clone [email protected]:<USERNAME>/<REPONAME>.git
$ cd <REPONAME>
$ npm install
$ echo "PORT=3000" >> .env
|
npm run start
然后挂起就行了。