Welcome to the "Introduction to API Development with TypeScript" workshop! This workshop is designed to introduce you to the fundamentals of building and consuming APIs using TypeScript.
Name: Lance Tan
Contact Information: https://www.linkedin.com/in/lancetan02/
By the end of this workshop, you will:
- Understand what APIs are and how they work.
- Implement endpoints in Express using Typescript.
- Learn how to consume API endpoints in your frontend.
Before you start, make sure you have the following installed:
This workshop involves building a full-stack application using the following technologies:
-
Frontend:
- React & Vite: A JavaScript library for building user interfaces.
- TypeScript: A superset of JavaScript that adds static types.
-
Backend:
- Express: A minimal and flexible Node.js web application framework.
- TypeScript: Used for writing backend logic with type safety.
-
Database:
- SQLite: A C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine.
-
Tools:
- Node.js: JavaScript runtime built on Chrome's V8 JavaScript engine.
- npm: A package manager for JavaScript.
First, clone the repository:
git clone https://github.com/ltan02/intro-to-api-workshop.git
cd intro-to-api-workshop
Navigate to the backend directory:
cd backend
Install the necessary dependencies:
npm install
Set up the SQLite Database:
npm run setup-db
Start the Express server:
npm run start
The server will run on http:https://localhost:8000
Navigate to the frontend directory:
cd frontend
Install the necessary dependencies:
npm install
Start the React application:
npm run dev
The application will run on http:https://localhost:3000