Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terieyenike/imagen-server
Express.js API designed to deliver random prompts seamlessly.
https://github.com/terieyenike/imagen-server
cors dotenv expressjs openai prisma xata
Last synced: 4 days ago
JSON representation
Express.js API designed to deliver random prompts seamlessly.
- Host: GitHub
- URL: https://github.com/terieyenike/imagen-server
- Owner: Terieyenike
- Created: 2024-07-26T15:13:14.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-27T01:58:21.000Z (5 months ago)
- Last Synced: 2024-12-16T04:36:32.440Z (8 days ago)
- Topics: cors, dotenv, expressjs, openai, prisma, xata
- Language: JavaScript
- Homepage: https://imagen-backend.onrender.com
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DALL.E Prompt Generator API
Introducing an Express.js API designed to deliver random prompts seamlessly. With Prisma as the ORM for efficient database interaction, this API comes equipped with dedicated routes for convenient retrieval.
## Features
- Obtain a random prompt
- Manage prompts using RESTful routes
- Set up a basic server with Express.js
- Support for environment variables with dotenv
- Enable Cross-Origin Resource Sharing (CORS)## Technologies
- Express.js: A web application framework for Node.js designed to build RESTful APIs.
- Xata: A serverless database utilized for data storage.
- Prisma: An ORM (Object-Relational Mapping) tool for interacting with databases.
- OpenAI: Provides an API for generating images based on textual prompts.## Environment variables
Create a `.env` file in the root of the project and add the following variables:
```bash
OPENAI_API_KEY="Your OpenAI key"
DATABASE_URL="postgresql://:@.sql.xata.sh:5432/:?sslmode=require"
SHADOW_DATABASE_URL="postgresql://:@.sql.xata.sh:5432/:?sslmode=require"
```To set up [Prisma with Xata's Postgres service](https://xata.io/blog/prisma-postgres-xata-integration)
Feel free to modify the content as per your specific project details and preferences.
## Learn more
- [Prisma documentation](https://www.prisma.io/docs)
- [Get started with Xata](https://xata.io/docs)
[CLIENT CODE](https://github.com/Terieyenike/imagen-pxcc-client)