2020-12-21 13:01:11 +00:00
|
|
|
# pm2-gay
|
|
|
|
|
2020-12-21 13:12:46 +00:00
|
|
|
A auto deployment script to be used with pm2. Automatially pulls code from github and sends log to a Discord Webhook.
|
|
|
|
Has no flexibility whatsoever, if ur dev edit it urself smh
|
|
|
|
|
|
|
|
# how to the use
|
|
|
|
h
|
|
|
|
## ingredient needed
|
|
|
|
- server you can fuck with
|
|
|
|
- money
|
|
|
|
- environment
|
|
|
|
- pm2
|
|
|
|
- npm
|
|
|
|
- express
|
|
|
|
- discord.js
|
|
|
|
- oil
|
|
|
|
|
|
|
|
## 1 buy a domain
|
|
|
|
|
|
|
|
## 2 port forward
|
|
|
|
1. stand up for once in ur life and walk to ur router
|
|
|
|
2. back of router
|
|
|
|
3. solve the ancient myth
|
|
|
|
4. SHA256 decode
|
|
|
|
5. ???
|
|
|
|
6. find ur router dashboard
|
|
|
|
7. cover yourself in oil
|
|
|
|
8. find port forward or virtual servers option, if you dont find it buy a better router that supports it
|
|
|
|
9. port forward 80
|
|
|
|
10. get a web server
|
|
|
|
11. make web server redirect to localhost:3000 (if u can just make it redirect /pm2/is/fucking/*)
|
|
|
|
12. make / redirect to rick roll
|
|
|
|
|
2020-12-21 13:22:05 +00:00
|
|
|
## pm2 config
|
|
|
|
if not follow instruction it will be angery
|
|
|
|
```js
|
|
|
|
app = {
|
|
|
|
"watch": true, //or to ur src folder if u npm i every time u restart, has to be on
|
|
|
|
"name": "name", //name
|
|
|
|
"cwd": "path to ur app hwrpoigheoivhq" //path
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## discord
|
|
|
|
1. make Webhook on ur discord
|
|
|
|
2. find this line somehow
|
|
|
|
```js
|
|
|
|
const webhook = new WebhookClient('e','e')
|
|
|
|
```
|
|
|
|
3. change first e to ur webhook id
|
|
|
|
4. second e to ur webhook token
|
|
|
|
ps: how to find id and token:
|
|
|
|
```
|
|
|
|
v id v token v
|
|
|
|
https://discord.com/api/webhooks/420694206942069420/m3gr0gheroiqpgh-9ithvio31nf-9u4qnrh4g-9gj-i43
|
|
|
|
```
|
|
|
|
|
|
|
|
## In ur script
|
|
|
|
1. find this shit
|
|
|
|
```js
|
|
|
|
const path = {
|
|
|
|
"app": "~/path/to/ur/app",
|
|
|
|
"cock": "~/and/ball/tor/ture",
|
|
|
|
"dame": "./dane"
|
|
|
|
}```
|
|
|
|
|
|
|
|
2. app is repo name(or folder)
|
|
|
|
3. ~/path/to/ur/app is path to ur app
|
|
|
|
3. floor is made out of floor
|
|
|
|
4. edit it for multi app
|
|
|
|
|
|
|
|
## in github
|
|
|
|
1. add webhook
|
|
|
|
2. post to `http://ur.domain.ef.eqf.qe.fewfqer.g.qerg.qr.ga/pm2/is/fucking/gay/`
|
|
|
|
3. enjoy auto deploy
|