NodeJS Bindings 🔥
## Goals 📃
- Make HappyX available for JS community;
- Make fast HTTP framework for JS;
- Make yet another SPA framework for JS (maybe in future).

## Examples 👨‍🎓
### ECHO Server 👋
```javascript
import {Server} from "happyx";

// by default host and port is 127.0.0.1:5000 so you may to call it without args
let server = new Server("127.0.0.1", 5000);


server.get("/", (req) => {
  console.log(req);
  return "Hello, world!";
});


server.start()
```

### WebSockets 🔌
```javascript
server.ws("/sockets", (ws) => {
  console.log(ws.state);
  if (ws.state == WebSocketState.Open && ws.data == "ping") {
    ws.send("pong");
  }
});
```

### Static files 📁
```javascript
server.static("/route", "./directory")
```

### Mount Other Apps 🛠
```javascript
const main = new Server();
const users = new Server();

main.mount("/users", users);

// at http://127.0.0.1:5000/users/
users.get("/", () => {return 1});
```

### Request Models 👨‍🔬
```javascript
const UserModel = new RequestModel('UserModel', {
  username: ''
});

app.post('/[u:UserModel]', (req: Request) => {
  console.log(req.params.u.username)
});
```

### Custom Path Param Types
```typescript
newPathParamType("myType", /\d\d/, (data: string) => {
    return Number(data[0]) + Number(data[1]);
});

app.get("/test/custom/types{a:myType}", (req: Request) => {
    return req.params.a;
})
```