Unable to start node.js server using static command - node.js

I am totally new to webrtc and nodejs. I was building a webrtc video calling app using webrtc tutorial http://www.tutorialspoint.com/webrtc/webrtc_environment.htm but this is build using Linux mint os and I have windows OS. So I have downloaded nodejs zip and set its path in environment variables . I am able to run js file also but I am not able to start node.js server using static command as told in step 6. How to use this static command in windows.

Related

How to deploy node js to linux ubuntu without source code?

In windows you can use nssm to make the source code become .exe and make it a service. In Linux I already tried it using pm2 and nginx but it still need the source code.

Can I create an android apk file terminal in backend to execute cmd

I am a beginner in web development and I am trying to create apps just using my mobile. When I trying to create a webapp with nodejs, which basically a voice assistant I found that nodejs's built-in module (child_process) which can exicute shell script very well but the problem is it executes the cmd in where the the Index.js file was deployed in my mobile terminal, but not in the mobile who use my webapp. So I think that can I use some kind of embedded terminal which can run in backend and execute cmd in there terminal, which will work like as a android app.
I use termux as terminal.

How to bundle a python server with pyinstaller for AppStore as 64bit only?

Context:
I am trying to put an electron app on the App Store. The app features a web frontend and a python backend. Nothing fancy so far.
The backend however features a separate server written in python. This server is a standalone application.
The electron app bundles the main app together with the python standalone server.
The problem:
When building the server as an executable I use pyinstaller on a python 3.5 development environment. Upon uploading to the AppStore I receive the following error:
1 package(s) were not uploaded because they had problems:
/var/folders/39/3v0phzy173s3qxkbxzvcpd5c0000gn/T/82AB662A-44C8-41E9-A213-8BF672F3DF10/1443777291.itmsp - Error Messages:
ERROR ITMS-90240: "Unsupported Architectures. Your executable contained the following disallowed architectures: '[i386 (in com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/AppKit._AppKit.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/AppKit._inlines.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/CoreFoundation._CoreFoundation.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/CoreFoundation._inlines.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/Foundation._Foundation.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/Foundation._inlines.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/PIL._imaging.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/PIL._imagingtk.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/PIL._webp.so, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libjpeg.9.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libopenjp2.2.1.0.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libtiff.5.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libwebp.7.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libwebpdemux.2.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libwebpmux.3.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/libz.1.2.11.dylib, com.ShapeRobotics.FableMac.pkg/Payload/Fable.app/Contents/Resources/app/app/app/server/objc._objc.so)]'. New apps submitted to the Mac App Store must support 64-bit starting January 2018, and Mac app updates and existing apps must support 64-bit starting June 2018."
We tried building the server using this:
pyinstaller server.spec --distpath ../app/app --noconfirm
It didn't work.
Another incantation I use to bundle the python server trying to force 64bit is:
arch -64 python ~/anaconda3/envs/shape/bin/pyinstaller server.spec -s --osx-bundle-identifier com.ShapeRobotics.FableMac --distpath ../app/app --noconfirm"
Why I'm sure it's the server:
I was successful in signing the app and getting it uploaded to the AppStore w/o the server packed in.
After packing in the server the 'i386' architecture error popped up.
Consequently my efforts so far have been focused to eliminate any shred of 32bit code in the server.
I assume that in order to do this I must properly configure the .spec file used by pyInstaller.
Does this make sense?
Is there a way to configure the spec file to force exclusive 64bit on anything bundled inside?
Is there some clear cut way to make the AppStore upload not vomit the 'i386' error?
Thank you!

Installing Node.js on browser server

I'm building a multiplayer game with node.js and socket.io and uploading it to itch.io. I can install node.js on my windows computer but how do I install it on the server that I'm using? Thanks!
The server that you would be using for deploying and running your app is just another machine(with OS) at a remote location- hence a remote server!
Now coming to your question- what you need to connect, install and run node.js on your server is a SSH client such as Putty (http://www.putty.org/).
You download and run putty on your windows machine and then enter your server's Hostname/IP-address. You will be able to see your server's terminal window once connected. Now you can go ahead and install node.js in it. Depending upon which operating system your server machine is running, you can install node.js accordingly.
Also, you probably want to transfer your project files that you created using node.js and Socket.io - for that you will need an FTP client such as FileZilla (https://filezilla-project.org/).
Once all that is done and your project is running- you can host it on your given website.

Developing iOS Meteor app on DigitalOcean

I need to develop an app compatible with iOS using Meteor. I'm going to put my project into a digitalocean droplet.
How can I run iOS-supported app from linux-based DigitalOcean droplet if iOS support requires Xcode?
You would first build the meteor app and deploy it to Digital Ocean. I would recommend MUP for the deployment process. It's super straight forward and easy. Sacha Greif has a great video on setting up the droplet.
https://github.com/arunoda/meteor-up
https://www.youtube.com/watch?v=WLGdXtZMmiI
Then you will build the meteor app for iOS
meteor add-platform ios
Follow this MDG wiki page for more info on building for iOS... https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration
Basically, if you want to run in a simulator, you can use the following command:
meteor run ios --mobile-server http://<your deployed server address>
If you want to build for iOS distribution, you can use the following command:
meteor build <bundle path> --server http://<your deployed server address>
With Meteor & Cordova your app is built in 3 pieces: Server, Client and Cordova.
The server is what you would put on DigitalOcean typically. The apps outputted by the meteor build would be the XCode project - not the ipa binary, the Android APK (if you build for android too) and the node server app.
You wouldn't be able to build the binary on DigitalOcean for iOS without Xcode but you can run the nodejs server app which would be your app's backend. Instead of the binary the raw Xcode project files are created in the output directory of meteor build. So you would need Xcode to build the binary on OS X which you could then upload to the app store.
So you could run the backend on the DigitalOcean droplet without the need of Xcode. It's just building the binary once off for the app store that would need an OS X machine.
The nodejs app would also serve up the client files if you loaded up the DigitalOcean droplet's URL in your browser.

Resources