2024-03-06 12:36:54 +01:00
# motivational-picture-generator
2024-03-06 15:29:35 +01:00
A project to learn NodeJS, ExpressJS, and whatever else along the way.
**THIS IS ALL WORK IN PROGRESS AND SUBJECT TO CHANGE**
To start server
```bash
npm run dev
```
2024-03-07 13:35:03 +01:00
Make url request to `localhost:4000` with. Not providing all the parameters will cause the render to fail atm. Have only added optional checking for CSS colors for now with garish defaults so I can see if something failed.
2024-03-07 11:49:55 +01:00
```bash
2024-03-07 13:35:03 +01:00
wget --output-document screenshot.png 'http://localhost:4200/submit/mpgParams?title=A Motivational Poster& sentence=something pithy& imageWidth=600px& imageUrl=https://dj.tdn.wf/image/400x300/282828& titleColor=blue& sentenceColor=orange& borderColor=red& backgroundColor=%23107a00'
2024-03-07 11:49:55 +01:00
```
2024-03-07 12:41:30 +01:00
This generates
2024-03-07 11:49:55 +01:00
2024-03-07 12:41:30 +01:00
![](screenshots/screenshot.png)
2024-03-06 15:29:35 +01:00
Testing with
```bash
ab -c 5 -t 15 http://localhost:4000/submit/\{\}
```