Skip to main content
NeonSign.com
Neon
Sign
.com
Menu
About Us
Frequently Asked Questions
Shipping
Returns Policy
Blog
Shop Ready-Made
Custom Made Neon
Contact Us
(323) 206-6798
🛒
0
Neon
Sign
Menu
About Us
Frequently Asked Questions
Shipping
Returns Policy
Blog
Shop Ready-Made
Custom Made Neon
Contact Us
(323) 206-5789
LIVE CHAT
🛒
0
Neon
Sign
.com
Call us @ (323) 206-6798
Menu
About Us
Frequently Asked Questions
Shipping
Returns Policy
Blog
Shop Ready-Made
Custom Made Neon
Contact Us
LIVE CHAT
🛒
0
Generate Neon
/** * Neon Sign Generator API * Run with: node server.js */ import express from "express"; import fetch from "node-fetch"; import cors from "cors"; const app = express(); const PORT = 3000; // ===== CONFIG ===== const LEONARDO_API_KEY = "YOUR_API_KEY_HERE"; // <-- replace const LEONARDO_API_URL = "https://api.leonardo.ai/v1/generations"; // ===== MIDDLEWARE ===== app.use(cors()); // allow WordPress domain app.use(express.json()); // ===== API ENDPOINT ===== app.post("/api/generate-neon", async (req, res) => { try { const { text } = req.body; if (!text) { return res.status(400).json({ error: "Text is required" }); } const prompt = `A realistic neon sign that says "${text}", glowing pink and blue neon tubes, dark background, ultra-detailed, studio lighting`; const response = await fetch(LEONARDO_API_URL, { method: "POST", headers: { "Authorization": `Bearer ${LEONARDO_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ prompt, modelId: "b24e16ff-06e3-43eb-8d33-4416c2d75876", width: 1024, height: 1024, num_images: 1 }) }); const data = await response.json(); // Leonardo returns images differently depending on account const imageUrl = data.generations?.[0]?.generated_images?.[0]?.url; if (!imageUrl) { return res.status(500).json({ error: "Image generation failed" }); } res.json({ imageUrl }); } catch (err) { console.error(err); res.status(500).json({ error: "Server error" }); } }); // ===== START SERVER ===== app.listen(PORT, () => { console.log(`Neon API running on http://localhost:${PORT}`); });
Top
×
Customize This Sign
Blank Form (#6)
Name:
Email Address
Phone Number
What do you want to customize?
Submit Form