OpenAI TypeScript Starter by Joseph Writes Code
The hardest part of learning something new is often just getting started. This starter project is designed to get you up and running with a minimal OpenAI TypeScript project as quickly as possible, so you can focus on learning new things. It includes comments in most files to help you understand what's going on, in terms of configuration.
- Beginners who want to learn without getting bogged down in configuration.
- Experienced developers who want to start a new project quickly.
- And folks who are here from one of my tutorials. 😃
- Next-gen TypeScript configured for ES Modules
- OpenAI API with OpenAI-Node
- API Key Loading with dotenv
- Linting with ESLint
- Formatting with Prettier
- Bundling with Pkgroll
- Dev watch mode with tsx
- Web server with Fastify
- Click the Use this template button above the file list
- Select Create a new repository
- Clone this repository
- Copy the contents of the repository to your project directory
- Run
npm install
to install dependencies
- Run
npm run dev
to start watch mode - Edit
src/index.mts
and watch the changes live in your browser
- Run
npm run build
to build your project - Run
npm run start
to run your project
The project starter is available as open source under the terms of the MIT License.