Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarthakjdev/create-express-ts-api
A starter to kit for developing REST API in typescript and express.
https://github.com/sarthakjdev/create-express-ts-api
express hacktoberfest nodejs prisma rest-api
Last synced: about 1 month ago
JSON representation
A starter to kit for developing REST API in typescript and express.
- Host: GitHub
- URL: https://github.com/sarthakjdev/create-express-ts-api
- Owner: sarthakjdev
- License: mit
- Created: 2022-10-19T22:55:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-29T06:43:32.000Z (about 2 years ago)
- Last Synced: 2024-04-25T05:21:17.999Z (8 months ago)
- Topics: express, hacktoberfest, nodejs, prisma, rest-api
- Language: JavaScript
- Homepage:
- Size: 130 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: Contributing.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
create-express-ts-api
A starter to kit for developing REST API in typescript and express.
[![Licence](https://img.shields.io/github/license/Ileriayo/markdown-badges?style=for-the-badge)](./LICENSE)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
[](https://www.npmjs.com/package/create-express-ts-api)
![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
![Prisma](https://img.shields.io/badge/Prisma-3982CE?style=for-the-badge&logo=Prisma&logoColor=white)
![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)
![restapi](https://user-images.githubusercontent.com/72249059/197589566-b2de5f90-1ddb-4d89-9811-e4da022bdd54.jpg)
---
Table of Contents
---
## Getting StartedFollow the instructions to initialize your express-ts-api project using this starter kit:
### Prerequisites
Install [NodeJS LTS](https://nodejs.org/en/)
- npm
```sh
npm install npm@latest -g
```### Initializing the project
1. Initiate your project by using the following npm command:
```sh
npx create-express-ts-api
```example : `npx create-express-ts-api Firstapi`
2. Install NPM packages
```sh
npm install
``````After this follow the steps to setup the Development DB: ```Setting up Development DB
> **Note** **If facing any issues, feel free to raise a [issue](https://github.com/sarthakjdev/create-express-ts-api/issues) or head towards Contact section **
3. Start the server by running the following command
```sh
npm run dev
```
---
### Tech Stack Used- [Node.js](https://nodejs.org/en/docs/guides/getting-started-guide/)
- [Typescript](https://www.typescriptlang.org/docs/)
- [Express.js](https://expressjs.com/en/starter/hello-world.html)
- [Prisma (as ORM)](https://www.prisma.io/docs/getting-started)---
### Setting up Development DB
To setup the DB follow the steps:
1. To set up the development DB make sure you have docker and docker-compose installed in your system.2. Add a .env file at the root of the project and add a Database URL in the file
```sh
PORT=3000
DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb"
```To Trigger the Development DB Setup run following commands
```sh
npm run dev:db
npm run db-generate
```
---
## ContributingContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull RequestRefer to this [Contribution.md](https://github.com/sarthakjdev/create-express-ts-api/blob/main/Contributing.md) if you have any difficulty in making a pull request
## License
Distributed under the MIT License. See [`LICENCE`](https://github.com/sarthakjdev/create-express-ts-api/blob/main/LICENSE) for more information.
---
## Contact
Sarthak Jain - [@sarthakjdev](https://twitter.com/sarthakjdev)
Email Id : [email protected]
Discord : Sarthak Jain#2443
LinkedIn: [LinkedIn](https://www.linkedin.com/in/sarthakjdev/)
---
## DocumentationTo know more details about it refer to the blog: [Hashnode](https://blog.sarthakjdev.com/develop-rest-apis)