2.3 KiB
		
	
	
	
	
	
			
		
		
	
	
			2.3 KiB
		
	
	
	
	
	
motivational-picture-generator
A project to learn NodeJS, ExpressJS, and whatever else along the way.
[!CAUTION] THIS IS ALL WORK IN PROGRESS AND SUBJECT TO CHANGE
To start server
npm run dev
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.
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'
This generates
Testing with
ab -c 5 -t 15 http://localhost:4000/submit/\{\}
Supported Arguments
Arguments with ‼️ are currently required
- titlestring that will be used for the H1 under ‼️
- sentencestring that will be presented below the H1 ‼️
- imageURLurl of the image to use ‼️
- imageWidthpx value to constrain the image size ‼️
- titleColoreither the word name of a color that css supports, or the hex value (note if using hex then you need to encode the # as- %23)
- sentenceColoreither the word name of a color that css supports, or the hex value (note if using hex then you need to encode the # as- %23)
- backgroundColoreither the word name of a color that css supports, or the hex value (note if using hex then you need to encode the # as- %23)
- borderColoreither the word name of a color that css supports, or the hex value (note if using hex then you need to encode the # as- %23). This will only be used in certain border types.
- borderTypename of the border to use. If not supplied no border is added.
Currently supported border types:
- basic-borderjust a simple colored bordered 
- corner-only-bordera fancy colored border that only goes around the corners. Defaults atm to pink if- borderColorisn't supplied 
Thanks
- Ana Tudor for the corner-only-border codepen.
