I have a vanilla nestjs monorepo that I am failing to run on Google App Engine. We first have to deploy a default service on GAE which I have attempted to do by taking the default nest app (my-app) in the monorepo and adding my app.yaml config and also a cloudbuild.json config file. The project looks like this:
apps
my-app
src
app.controller.ts
app.module.ts
app.service.ts
main.ts
tsconfig.app.json
app.yaml // GCP config file
clouldbuild.json // GCP config file
my-project
src
app.controller.ts
app.module.ts
app.service.ts
main.ts
tsconfig.app.json
nest-cli.json
package.json
tsconfig.json
node_modules
The error I get is when I deploy to GAE is :
no such file or directory, open '/workspace/package.json'
I guess this is because the package.json is not at the same level as app.yaml. However as this is a monorepo and the package.json is shared across apps how should I configure GAE and Cloud Build to read the package.json from the root folder but only deploy the service in app.yaml? The app.yaml according to gcp docs the app.yaml has to be at the same level as the source files. GCP docs link
Related
I am trying to deploy my react app but its not deploying anywhere, I have tried on Github pages, Heroku and Netlify. This is the repo link please someone help.
LINK:- https://github.com/harsh021102/hackat1
Heroku works. https://murmuring-anchorage-77354.herokuapp.com/
1- remove "homepage" from your package.json
2- npm run build
3- copy example project https://github.com/aydink88/heroku-express-spa
4- replace the example project build folder with your build folder
5- push only the express project repo to heroku (netlify and github doesn't work this way)
here's my repo https://github.com/asujsi/user-list
I want to deploy it to heroku, I tried and failed.
Should I deploy both db.json and react project in separate repo please help
How can one deploy a create react app to gh-pages?
My packages.json folder has my homepage listed exactly as this: "homepage": "https://mgcraig78.github.io/RoboFriends",
However, the app will not deploy to gh-pages, and when I enter npm run build, the terminal tells me this (which I'm assuming is the issue, but I can't figure out how to fix it): The project was built assuming it is hosted at /RoboFriends/. <- this obviously is not the homepage I have entered into my packages.json file.
Remove the /RoboFriends from your homepage link in package.json to:
"homepage": "https://mgcraig78.github.io"
Then run
npm run build
What you deploy to github is what's inside the build folder that contains index.html
I am deploying ant-admin dashboard in apache2 rather nginx.
How do I configure apache2 for antd-admin dashboard?
repo: https://github.com/zuiidea/antd-admin
npm run build
// Generated build files under /dist
copy paste in apache2 document root /Library/Web
cp -r /dist Library/WebServer/Documents/
trying to call
http://localhost/dist
Page is not loading
When I checked console. css, js files are serving from http://localhost/umi.css but expecting it should serve from http://localhost/dist/umi.css
How do I serve css, js and sub directory /dist in apache2?
use home page key in the package.json
"homepage": "./dist"
https://facebook.github.io/create-react-app/docs/deployment#step-1-add-homepage-to-packagejson
I have created a react app with create-react-app in a subfolder of my project. Url of current app is http://app.local and url of react app is http://app.local/v2.
What i want is when i run npm start a browser window should open from http://app.local/v2 instead of http://localhost:3000 and when i run npm build the paths should be point to the relative directory.
I already tried basename and start_url parameters.
Thanks.
Create React App builds your app to be hosted at the server root by default.
To change this behavior, set the homepage in your package.json, like this:
{
...
"homepage": "http://mywebsite.com/subdirectory",
...
}