Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fhasnur/contact-directory
📱Contact Directory, simple RESTful API for managing contacts. It allows users to store and retrieve contact information easily.
https://github.com/fhasnur/contact-directory
Last synced: 29 days ago
JSON representation
📱Contact Directory, simple RESTful API for managing contacts. It allows users to store and retrieve contact information easily.
- Host: GitHub
- URL: https://github.com/fhasnur/contact-directory
- Owner: fhasnur
- Created: 2024-04-18T15:19:01.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-06T15:42:05.000Z (9 months ago)
- Last Synced: 2024-05-07T16:25:35.420Z (9 months ago)
- Language: TypeScript
- Homepage:
- Size: 183 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contact Directory
### How to Run Locally
1. **Install Node.js and MySQL**:
- If you haven't already, install Node.js and MySQL on your local machine. You can find installation instructions on their official websites:
- [Node.js](https://nodejs.org/)
- [MySQL](https://www.mysql.com/)2. **Clone this repository to your local machine**:
3. **Set Up Environment Variables**:
- In the root directory of the project, rename the `.env.example` file to `.env` and set the following environment variable:
```js
DATABASE_URL="mysql://root:@localhost:3306/contact_directory"
```4. **Install Dependencies**:
```
npm install
```5. **Run Prisma Migrations**:
```
npx prisma migrate dev
```6. **Generate Prisma Client**:
```
npx prisma generate
```7. **Execute Build Script**:
```
npm run build
```8. **Start the API Server**:
```
npm run start
```9. **Access the API**:
- The API should now be running locally at `http://localhost:3000`.