Cannot Get/ React JS server tutorial - node.js

Im try to do the React JS tutorial and im trying the server in node. I downloaded first, all files in https://github.com/reactjs/react-tutorial/ then I put in folder then I command prompt it. and type npm install then node server.js "Server started: //localhost:3000./
Then when I go to the localhost:3000.is said Cannot Get/ .
What's the problem?

Are you entering localhost:3000 without a period?

If you wish to learn React JS. Please install on the local machine and related module like node JS, etc.
Please have look below link for your review. May be it will help you.
React JS – Install and Setup

Related

Install and add custom events of #braze/sdk-web package in sails js/node js

how to install and add custom events of #braze/sdk-web package in sails js/node js. As I followed the documentation of braze but sails js server keeps giving error(restarting the server)
#braze/web-sdk isn't supported in Node.js environments.
If you post the actual error it'll help find the root cause.

Create-react-app npm run build too slow

I am relatively new to using React and am following create-react-app tutorials. I am creating a simple webchat service using socket.io, React, and Express in a Node environment.
I've finished writing the majority of the features for the React app and am now working on the server end to connect the apps via Socket.io. Working on the front-end was each because I could just run "npm start" to serve a dev version of my app. However, now that I am working on the server side, implementing Socket.io, whenever I find an issue on the front-end, I have to rerun "npm run build" which takes ~15-30 seconds each time.
I am sure there is a faster way to debug issues like this without having to compile my react app into static files every time. Please advise.
You should run the front end using npm command on cmd panel npm start and debug the backend server side using VSCode Debugger using the node js extension. This way you can run both on dev easily. Plus it give you advance debugging features.

Installing NodeAdmin for Node.JS on Ubuntu

I'm a seasoned developer in using the LAMP stack and am trying to switch over to Node.js and play around with it. For database management, I love the flexibility and ease of PHPmyadmin and found the NPM package NodeAdmin to be exactly what I"m looking for in terms of an analogue.
But when trying to install and access nodeadmin, the instructions look like complete Greek to me as someone coming from the Apache environment: https://www.npmjs.com/package/nodeadmin
I ran
npm install nodeadmin
inside the root directory and all looked good. But now I'm unable to access nodeadmin under mydomain.com/nodeadmin as it says I should in the instructions. What directory should I be installing nodeadmin in? What the heck do I do with the code in the "Setup" section of that tutorial?
Thanks in advance for helping break in a newb to his new environment.
Looks like nodeadmin is meant to be run as express middleware. The most basic set up would be to create a new file, let's call it app.js. The content of app.js should be:
var express = require('express');
var app = express();
var nodeadmin = require('nodeadmin');
app.use(nodeadmin(app)); //here is where you add the middleware
app.listen(80);
After that, go to directory where you created app.js and run the following commands
npm install express
npm install nodeadmin
node app.js
It looks like nodeadmin is express middleware, so you don't install it standalone. Instead you include the middleware in your website application and then access it via the same host on the /nodeadmin path.
I guess it uses the mysql config from your app to connect to the same db so you can use it to manage the application data.
var nodeadmin = require('nodeadmin');
app.use(nodeadmin(app));
express is a web framework for building nodejs apps. The nodeadmin module you're using can only be used as part of an express application. You'll need to use something else if you want to run it standalone.
A quick google turns up Express Admin. Looks like it's built using express, but doesn't need to be installed as part of an express app. You could give that a try. There may be better alternatives
I ended up getting more errors after following the above answers and am giving up and installing PHPmyadmin (which I realize I should have done from the beginning). Thanks for the answers.

Meteor leaderboard app on node-webkit

I am trying to get the meteor leaderboard app to run on Node-Webkit.
I have demeteorized it and compressed it to a .nw file but when I drop it in. I get errors:
Invalid Package There is no 'package.json' in the package, please
make sure the 'package.json' is in the root of the package.
I have read on various thread but nothing clear yet.
It seems like the demeteorized app needs to be restructured. Also need to figure out how to run the server [Locally/DDP].
Edited:
P.S. I am using the demeteorized files from the leaderboard meteor app to be able to run it in node-webkit.
What exactly I am trying to figure out here is :
how to run/init the local node(demeteorized) server and set the port.
How to set environment variables for the demeteorized app for mongodb etc.
What would be used as the
"main": ?,
"node-remote": ?
for the node-webkit package.json file.
Can someone please shed some light and if possible an example will be highly appreciated.
Thanks in advanced.
Praney :)
UPDATE:
After tinkering a bit, I added the "main": "index.html" and added index.html file to the root of the demeteorized app. This file just loads the main.js file in the browser, here:
<!DOCTYPE html>
<html>
<head>
<title>Leaderboards</title>
</head>
<body>
</body>
<script src="main.js" type="text/javascript"></script>
</html>
Now I am getting this error:
"Uncaught ReferenceError: __dirname is not defined", source:
file:///Users/Praney/projects/webkit/nw-sample-apps/leaderboards/main.js(2)
main.js
process.argv.splice(2, 0, 'program.json');
process.chdir(require('path').join(__dirname, 'programs', 'server'));
require('./programs/server/boot.js');
This isn't how demeteorizer is meant to be used.. exactly/kind of.
You would use the output bundle on your deployed server to run as your meteor app, not put it in an existing meteor app.
The package.json that you get from it is slightly different to the one that meteor-npm would use.
When you've finished your meteor app you would use demeteorizer to create an easy bundle that can run on your server. If you uploaded it and untarred it:
You would install the npm modules by cding into the bundle and running npm install
You can run the app as normal as described in the docs.
The whole purpose of demeteorizer is to nodify your app, you wouldn't need to this on the platform you made it since all the npm modules would already be working. The problem it solves is usually with cross-archs, e.g if you made your app on OS X and it uses binary npm modules and the server uses Ubuntu (not os x)
I suppose node-webkit could also do it, you would need to use the root directory of demeteorize for this (seperate from your app). You can see there's a package.json already in it, perhaps the root directory you set it to use is that of your meteor app and not the untarred output of the demeteorized app?

ruining EasyRTC server using iisnode

EasyRTC is one of the best available opensource WebRTC solutions that runs in node.js! I have manged to run it on node.js on my system but my application is in Asp.net so I've been trying to run it using under IIS using iisnode! but for some reason I haven't been able to make it work! running this application in node.js i use node server.js to start the server but in IIS when i set the default page to server.js to start the application it wond work!
this is result by using
nodejs:
nodejs result: (working properly)
IISNODE Result:
looks like it's not even running it !
This error is due to lack required module for easyRTC. type in node command prompt "npm install" It will install all dependency module. And after that try to run server. I hope It will work for you.

Resources