This Random-Character was made as a challenge to try out my understanding about if statement using javascript, the backend is developed with typescript for a better error handling and express.
This project was made to easily create a character for a RPG game, each characteristic has randomly generated output, among the options your character can have:
Hair Type
-
Curly
-
Wavy
-
Straight
-
Bald
Hair Color
-
Black
-
Brown
-
Blonde
-
White
-
Ginger
Eye Color
-
Black
-
Blue
-
Green
-
Grey
-
Purple
-
Red
-
White
-
Brown
-
Yellow
-
Pink
-
Orange
Race
-
Elf
-
Human
-
Orc
-
Dwarf
-
Night Elf
-
DragonBorn
-
Fairy
-
Goblin
-
Half
Class
-
Soldier
-
Knight
-
Barbarian
-
Paladin
-
Black Mage
-
White Mage
-
Red Mage
-
Rogue
-
Archer
-
Engineer
-
Fighter
-
Summoner
-
Tamer
-
No Class
-
2 random classes
-
3 random classes
-
2 classes of your choice
-
3 classes of your choice
-
?
Sex
-
Male
-
Female
- HTML
- CSS
- Javascript
Go to the server folder and install dependencies, run npm run dev
on the terminal, and it will be available for use.
Server runs on port 127.0.0.1:1436 with CORS enabled
- Express
- Typescript
Body
Key | Value |
---|---|
hairType |
selected |
hairColor |
selected |
eyeColor |
selected |
race |
selected |
classSelection |
selected |
sex |
selected |
RESPONSE
{
"hairType": "Bald",
"hairColor": "Ginger",
"eyeColor": "Red",
"race": "Dwarf",
"classSelection": "Barbarian",
"sex": "Male"
}