This repository was archived by the owner on Aug 7, 2023. It is now read-only.
Repository navigation
|
I just find out Deta, and I am really surprised how powerful Deta is. i would like to ask how to have a React app in a micros so i can show the React app on the home page. ? |
Answered by
abdelhai
Jun 5, 2022
Replies: 2 comments 1 reply
|
hi, thanks! react apps are not well supported on micors yet. we're working on a better solution which could be ready in a few months. |
0 replies
Answer selected by
abdelhai
If you are using node and express:Creating your React client:
The reason to put the dot
// install express with `npm install express`
const path = require("path");
const express = require("express");
const app = express();
app.use(express.static(path.resolve(__dirname, "client")));
app.get("*", (req, res) => res.sendFile(path.resolve(__dirname, "../client", "index.html")));
// export 'app'
module.exports = app;Deploying to Deta Micro:Now you can use this command to always build the client and then deploy to the micro by using: |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi, thanks!
react apps are not well supported on micors yet. we're working on a better solution which could be ready in a few months.