You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aayush Garg-gamer1478
c21567dca8
|
4 years ago | |
---|---|---|
.. | ||
API.md | 4 years ago | |
README.md | 4 years ago | |
apache.md | 4 years ago | |
atoz.md | 4 years ago | |
auto-login.md | 5 years ago | |
development.md | 5 years ago | |
docker.md | 5 years ago | |
downloading-files.md | 4 years ago | |
flags.md | 4 years ago | |
https.md | 4 years ago | |
nginx.md | 4 years ago | |
service.md | 4 years ago | |
terminal.png | 5 years ago |
README.md
Docs
API
For WeTTy options and event details please refer to the api docs
Getting started
WeTTy is event driven. To Spawn a new server call wetty.start()
with no
arguments.
import { start } from 'wetty';
start(/* server settings, see Options */)
.then((wetty) => {
console.log('server running');
wetty
.on('exit', ({ code, msg }) => {
console.log(`Exit with code: ${code} ${msg}`);
})
.on('spawn', (msg) => console.log(msg));
/* code you want to execute */
})
.catch((err) => {
console.error(err);
});