Skip to content

jclark1913/michigan-facts-ts

Repository files navigation

Michigan Facts


View documentation »

View Demo · Report Bug · Request Feature

Top Languages GitHub repo size GitHub code size in bytes GitHub contributors GitHub last commit GitHub issues GitHub

Table of Contents
  1. About The Project
  2. Getting Started
  3. License
  4. Contact
  5. Acknowledgments

About The Project

Product Name Screen Shot

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.

(back to top)

Built With

Express Typescript PostgreSQL ElephantSQL Vercel Node.js Express Prisma ChatGPT

(back to top)

Getting Started

You can use the API by following this link to get a random fact.

If you want to build from source, follow these steps:

  1. Clone repo
git clone https://github.com/jclark1913/michigan-facts-ts
  1. Install dependencies
cd michigan-facts-ts
npm install
  1. 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
  1. Run the server (defaults to port 3001)
npm run start
  1. Visit localhost:3001. You can use the endpoint /facts for a random Michigan fact or visit /facts/<id> to see facts by their ID.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Justin Clark - @JustinClarkJO - jclarksummit AT gmail DOT com

Project Link: https://github.com/jclark1913/michigan-facts-ts

(back to top)

Acknowledgments

(back to top)

About

A lightweight typescript API that serves facts about Michigan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published