Welcome to the TypeScript API repository! This project is a robust Node.js application built with TypeScript and Express.js. It incorporates ESLint, Prettier, and more to ensure a clean and maintainable codebase.
- TypeScript Support: Enjoy the benefits of static typing.
- Express.js Framework: Build RESTful APIs easily.
- ESLint Integration: Keep your code clean and consistent.
- Prettier Formatting: Automatically format your code.
- Husky for Git Hooks: Ensure quality checks before commits.
- Vitest for Testing: Fast and reliable testing framework.
- Well-structured Boilerplate: Start your projects quickly with a solid foundation.
This project utilizes a variety of technologies to enhance development and performance:
- TypeScript: A superset of JavaScript that compiles to plain JavaScript.
- Node.js: JavaScript runtime built on Chrome's V8 engine.
- Express.js: Fast, unopinionated, minimalist web framework for Node.js.
- ESLint: A tool for identifying and fixing problems in JavaScript code.
- Prettier: An opinionated code formatter.
- Husky: Prevents bad
git commit
,git push
, and more by using hooks. - Vitest: A testing framework designed for speed and simplicity.
To get started with this project, follow these steps:
-
Clone the Repository:
git clone https://github.com/taismartinslima/TypeScript-API.git
-
Navigate to the Project Directory:
cd TypeScript-API
-
Install Dependencies:
npm install
-
Set Up Environment Variables:
Create a
.env
file in the root directory and add your environment variables. Use the.env.example
file as a reference. -
Run the Application:
npm start
Your application should now be running on http://localhost:3000
.
You can interact with the API using tools like Postman or curl. Here are some example requests:
GET /api/items
POST /api/items
Content-Type: application/json
{
"name": "New Item",
"description": "Item description"
}
PUT /api/items/:id
Content-Type: application/json
{
"name": "Updated Item",
"description": "Updated description"
}
DELETE /api/items/:id
To run tests, use the following command:
npm test
This will execute the test suite using Vitest.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your branch to your forked repository.
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For the latest releases, visit the Releases section. Download the necessary files and execute them as needed.
Feel free to check back regularly for updates and new features!
Thank you for checking out the TypeScript API project! We hope you find it useful for your development needs. If you have any questions or feedback, please feel free to reach out. Happy coding!