I have is installed Parse Cloud Code on my Mac but I can't edit the main.js to edit my cloud code. What am I missing?
To Edit Cloud Code we have to first Traverse To the Cloud Code Folder
which in clude 3 Folders namely cloud,config,node_modules.
Your main.js will be in cloud folder.
open that and edit the main.js page
then save it.
After saving,
the main step is pushing the code to parse.com.
in parse console type command parse deploy
after successfull deploy your code will be on parse.com.
You need to use parse.com command line tool: you edit locally in your machine, and then deploy your code.
More info, in parse.com documentacion: https://parse.com/docs/js/guide#cloud-code
Related
Firstly, I'm sorry for my English grammar...
Okay, so I already run my react on the website, but when I type the site URL in the address bar, I need to even put :3000 after the URL. If it's running on-site, I don't want to put the port on the URL.
Can anyone help me on how to run react without the port number in the deployed site?
it should look like this... example.site.com not like example.site.com:3000
If you need any details to tell me in the comments. THANKS IN ADVANCE!!!
Did you run npm run build and take the "build" folder that is generated and copied that folder to your server?
If you did it, its not a React problem/configuration, it's an server configuration, and depends of the server your are using. Nginx is a popular one.
If you don't run npm run build and you put all your project code on the server, and you are running that code with npm start then you are doing it your deployment in the wrong way.
I created an app with create-react-app and I'd like to log something in its server console. How could I do this?
I've tried adding index.js to the root folder and creating server folder, but it doesn't work.
Edit: I don't mean the backend server here, but just the frontend server. I'd like to print something in the same console where I type npm start. Is it possible?
If I understand correctly to do such a thing you should do eject your create-react-app otherwise you won't be able to modify the build scripts.
After the eject you can modify the webpack script or any other script you need to.
If you decide to do it, be careful because it will be more difficult to update your build dependencies.
First, you cannot put your backend code in the frontend code. Because the backend code is run by Node.JS enabled server. But the front end code is run by your browser.
All the react code will be bundled into one js file, which will be loaded by the browser. It will be simple JS files that renders views.
When you see localhost:3000 the server is given to you by default to VIEW and LOAD your front-end code. Most of the times it is webpack-dev-server.
The common options are:
1) If backend is REST/SOAP api then use XHR/ajax to hit the api. You just have to put the react generated JS file to your backend server's public folder. Also you can use completely different repos/codebases too in this approach.
2) You can use Server side rendering of sort where you put front end code in your backend views.
this is my first time making a nodejs app, and using express. I created the project using create-react-app. I am trying to setup a CI/CD pipeline using VSTS to deploy to my Azure Web App. I am able to get my React code working on the web app, but when I try to hit my Express route, it throws a 404, and renders the index.html file instead of retrieving the data.
Here is my file structure: File Structure
My Package.json: Package.json
My Express server: server.js
Also, here is my build VSTS:
Archive
drop
And here is my Release:
Release
And this is what is put onto the server: Azure files
When I run this locally, hitting localhost/api/getData returns my data as expected. But for some reason it does not work in production.
Any help would be greatly appreciated! I've been stuck on this for the last 2 days and I can't seem to find anything that has helped. I've read multiple forums, but none of the fixes they provide seem to be working. Thank you!
I am developing ionic application and using gulp utility to minify js files.
To avoid gulp getting configured in all the systems of team members, I am planning to have remote system which will communicate with TFS, take the project and put it in some folder and then I will install gulp on that and run task accordingly.
But my question is how to make connection from remote system to TFS to get project ? I know through Eclipse i can pull and get the project but is there any independent approach like running batch file and getting things done.
Overall aim is to avoid installing run in all the team member system instead they can connect to remote system and take the minified versions.
Help is appreciated !
According to your description, you just want to get a version from TFS to the workspace on your remote machine.
There are several ways to achieve this:
Install VS/Team Explorer on the remote machine, then perform get latest or get specific version from history.
Go to TFS web portal, navigate to CODE tab, select the project, and choose Download as Zip.
Use TFS Get command to get (download) either the latest version or a specified version of one or more files or folders from Team Foundation Server to the workspace.
Syntax:
tf get [itemspec] [/version:versionspec] [/all] [/overwrite] [/force] [/remap]
[/recursive] [/preview] [/noautoresolve] [/noprompt]
[/login:username,[password]]
Write a batch script to invoke command line. Check http://n3wjack.net/2014/02/02/how-to-pull-from-tfs-from-the-command-line/
I started using naught for node.js deployment (https://github.com/andrewrk/naught).
I have a folder in Ubuntu Server containing my node.js(express) app.
I deployed it using "naught start app.js" from this folder.
Now I would like to redeploy/update my code with zero downtime.
What should I do?
Suppose I have my code on a git server, do I "git pull origin master" in the same folder and then "naught deploy" to deploy the new code? Or maybe I need to pull the new code to a new folder and deploy the new code in another way?
Pulling the latest changed from Git and calling 'naught deploy' should do the trick. You don't need to clone your code a different directory.
Notice that the 'deploy' command expects an .ipc file, and by default looks for it in the same directory from which you called deploy. If, when starting naught you specified a different location for the .ipc file, then you should call deploy with that location.
So for example, if you did:
naught start app.js --ipc-file /var/run/naught.ipc
Then when deploying use:
naught deploy /var/run/naught.ipc
At BigPanda we use naught in production this way, and it works perfectly.