Hello there @apsimos and welcome to the community!
What kind of features does your app have?
Cheers,
Matias
Hey @Matias.Monday,
Thanks for your quick reply. My app has a board view feature not integration. But this is not the case I guess. On server side there is no kill-port binary. Normally it should not run the package.json file since there is generated js, css and html file.
Hi @Matias.Monday,
Is there any progress for this issue?
Thanks
Do you have kill-port
in your devDependencies
in package.json
?
"devDependencies": {
"@mondaycom/apps-cli": "^2.1.1",
...
"kill-port": "^2.0.1",
...
}
If not, try:
npm i kill-port
Take a look at the example here:
github.com
Hi @dvdsmpsn,
This is my package.json file. I have added your npm package to package.json file. It does not work either.
{
"name": "monday-react-quickstart-app",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "npm run stop && concurrently \\"npm run server\\" \\"npm run expose\\"",
"build": "react-scripts build",
"expose": "mapps tunnel:create -p 8301",
"server": "react-scripts start",
"test": "react-scripts test",
"eject": "react-scripts eject",
"stop": "kill-port 8301 && kill-port 4049 && kill-port 4040"
},
"dependencies": {
"@mondaycom/apps-sdk": "^2.1.2",
"monday-sdk-js": "^0.5.0",
"monday-ui-react-core": "^1.54.0"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@mondaycom/apps-cli": "^2.0.0",
"concurrently": "^5.2.0",
"cross-port-killer": "^1.2.1",
"kill-port": "^2.0.1",
"eslint-config-react-app": "^7.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
"sass": "^1.54.8"
}
}
@apsimos The quickstart-react sample cannot run on monday code by itself because it’s a client only code (single page application). monday code runs server side code, so if you want to run client code, you will need to either:
- Package it and upload as zip to our CDN
- Add your own server that runs on monday code and serves the static files
We released lately a new capability that you can try and start from, which creates a new fullstack application from a template, and it’s suited for deploying on monday code. You can do it by running:
mapps app:create -d <FOLDER-DIRECTORY>
Hi @gregra
Building the app and uploading it to monday.com makes the trick. But I have followed the instructions that monday.com promotes. I think there is a UX problem. That is my thought.
Thank you for your help.
Thank you for the feedback @apsimos !
It has been shared with the team 😁
Hi @gregra and @Matias.Monday
As @gregra says here, it is not possible to upload client side application’s code the the monday servers via the mapps
tool. He stresses also if the app should go via the the mapps
tool it needs to be wrapped with a server side code.
But actually I do not want a server side code. I need to pipeline this client side application to CI/CD leveraging mapps
tool without spinning a server side code like express in nodejs.
The goal is to mitigate error prone deploys manually such as I have many features for an app and I need to install the code for every feature which is potentially leads to missing feature deployment.
Is there a magic way or workaround to use CI/CD pipeline with single page react applications. Any help is appreciated.
Best
Hello there @apsimos,
I have checked this with the team in charge of monday-code and as of today, there is no workaround for this.
Let me know if you have any other questions 😀
Cheers,
Matias
The simplest way to do this with mapps would be to deploy an empty nodejs project, but add your current built code into the static directory.
This would mean you have a web server serving your code, and you can automatically deploy it using your CI/CD pipeline. Monday code would also give you some obervability and access logs.