-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Create Mcpe generator #2644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Create Mcpe generator #2644
Conversation
Mcpe generator for Minecraft PE
@KomkaGames is attempting to deploy a commit to the Onlook Team on Vercel. A member of the Team first needs to authorize it. |
const User = mongoose.model('User', userSchema); | ||
|
||
// Налаштування AWS S3 | ||
const s3 = new AWS.S3({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using hardcoded AWS credentials; rely solely on environment variables to manage sensitive data.
}, { | ||
headers: { Authorization: `Bearer your_huggingface_api_key` }, | ||
}); | ||
const fileBuffer = textureResponse.data; // Припускаємо, що це бінарний файл |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current code assumes textureResponse.data
contains binary file data, but the Hugging Face API typically returns JSON responses. To properly handle this, extract the actual image data from the response. For example:
const fileBuffer = Buffer.from(textureResponse.data.image, 'base64');
This converts the base64-encoded image data from the JSON response into a proper binary buffer that can be uploaded to S3. The exact property name (image
) may vary depending on the specific Hugging Face endpoint being used.
const fileBuffer = textureResponse.data; // Припускаємо, що це бінарний файл | |
const fileBuffer = Buffer.from(textureResponse.data.image, 'base64'); |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
if (firebaseUser) { | ||
setUser(firebaseUser); | ||
// Встановлення плану "Про" для вашого email | ||
await axios.post('http://localhost:3000/api/set-plan', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded URL http://localhost:3000/api/set-plan
won't work in production environments. Consider using relative URLs (like /api/set-plan
) or implementing a configurable base URL that can be set according to the environment. This approach ensures the application works correctly across development, staging, and production environments.
await axios.post('http://localhost:3000/api/set-plan', { | |
await axios.post('/api/set-plan', { |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Mcpe generator for Minecraft PE
Description
Related Issues
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Important
Introduces a Minecraft PE texture generator with Node.js backend and React frontend, including user authentication, texture generation, and history tracking.
server.js
with Node.js and Express for handling API requests./api/generate-texture
for texture generation with resolution checks./api/set-plan
,/api/history/:userId
, and/api/set-language
for user management.src/App.js
for React UI with Firebase authentication.i18n.js
for localization.cypress/integration/app.spec.js
for login, language change, texture creation, and history display.package.json
with necessary dependencies for backend and frontend.This description was created by
for a6a364d. You can customize this summary. It will automatically update as commits are pushed.