View documentation »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Michigan Facts is a lightweight API for serving facts about the state of Michigan. Its primary purpose is to support a silly discord bot I built to educate/annoy my friends. I wrote Michigan Facts in Typescript using Express along with a database in PostgreSQL using Prisma, and as impressive as my Michigan trivia is I did lean on our friends at ChatGPT to help generate facts for the database.
You can use the API by following this link to get a random fact.
If you want to build from source, follow these steps:
- Clone repo
git clone https://github.com/jclark1913/michigan-facts-ts
- Install dependencies
cd michigan-facts-ts
npm install
- Create and seed the database using the prisma cli. (NOTE: You'll also need to update your
DATABASE_URL
environmental variable)
createdb michigan_facts
npx prisma generate
npx prisma db seed
- Run the server (defaults to port
3001
)
npm run start
- Visit
localhost:3001
. You can use the endpoint/facts
for a random Michigan fact or visit/facts/<id>
to see facts by their ID.
Distributed under the MIT License. See LICENSE.txt
for more information.
Justin Clark - @JustinClarkJO - jclarksummit AT gmail DOT com
Project Link: https://github.com/jclark1913/michigan-facts-ts
- All 5 of the Great Lakes
- Best-README-Template