How To Run Redux Example Todo List on NodeJS - node.js

i found example app on Redux documentation here http://rackt.org/redux/docs/basics/ExampleTodoList.html .
But have one question how to run it on nodejs server and preview the results on browser
Is beter if using expressjs as framework without using express generator.

package.json there has all the packages requirements
use npm install to install all dependencies and then npm start
https://github.com/kweiberth/react-redux-todo-demo - This will come in handy for you - it isn't mine though.
Just copy the repo and get started.

Related

Angular2 development Without node and npm

I am new angular2 development, and what i came to know is before starin the angular2 development, I must install the nodejs for server and npm to download dependencies from official documentation.
I succesfully deployed the source code in tomcat sever[by build]
So my Question is after installation and creating the new project, i got node_modules. By using these node_modules(can i start development of angular2 on another i.e a new machine where node & npm is not installed)
Basically my question is.. I want to start development of angular2 by using the project structure on new machine. Without the installation on node & npm
From Angular docs
Node.js and npm are essential to Angular development.
If you built/compiled the app and have all the modules installed (you have your node_modules) folder then its just javascript and html which you can run on any server you want.
For npm, if you need any modules/packages, I think you can manually download the package and add it to your development environment. But what if the process needs to be automated? You can't just sit there and download all the packages from github. So npm is really helpful when it come to this. You only need a file containing all dependencies, and run it at build time (package.json)
About nodejs, nodejs allows you to run javascript on the server when you need any interaction with the database. So why don't we just go with the easy way?

Apollo with Angular Quickstart : Unknown error

I am a complete newbie in web development, and I am completely lost.
I want to develop a web application with a backend developed with Django, and a frontend developed with Angular. I want the interaction between the backend and the frontend to be accomplished with Apollo and GraphQL.
Taking this into account, I started developing a couple of simple models in Django, and doing some queries with the Python package graphene. It seems to be working well, so now I tried to develop a simple Angular application that renders the instances of the Django created models.
And that is where I am stuck. I have downloaded the Angular Quickstart used in the Angular tutorial (https://github.com/angular/quickstart) to start testing Apollo. I have run the following commands in the terminal:
$ git clone https://github.com/angular/quickstart.git
$ cd quickstart
$ npm install
Furthermore, to install Apollo, I have run the following commands:
$ npm install whatwg-fetch apollo-client apollo-angular graphql-tag --save
Finally, to run the local server, I typed $ npm start in the terminal. And that is where the following error is raised:
node_modules/#types/isomorphic-fetch/index.d.ts(8,30): error TS2304: Cannot find name 'fetch'.
I am getting mad trying to solve this issue, and I have not found any documentation on this, maybe because I do not have an extensive background on web development.
I am using node v6.10.3, npm v3.10.10 and Ubuntu 16.04 LTS. Any advice or help to solve the problem would be appreciated, thanks.
you have a problem with typings, try installing #types/whatwg-fetch.
The release of #types/isomorphic-fetch you have installed (one of the deps of apollo-client) assumes that you have a declaration of window.fetch.
The ~2.3 version of TypeScript has that definition in dom library and I think this is why Apollo and #types/isomorphic-fetch decided to work this way.
There are two solutions:
Install #types/whatwg-fetch package (or different) or define fetch by yourself
Update TypeScript to 2.3.X (and have dom specified in compilerOptions.lib

Meteor: Cannot find module 'angular'

I'm newbie on Meteor.
After one week on it, and started by implementing the todo of the tutorial as describe here, every things was good locally.
just the fact that I'm continually trying to deploy it, but my heroku
link(https://tasktor.herokuapp.com) just show a blank page with
the this error in de debugger:
Error: angular#^1.2.27 not installed. tmeasday_check-npm-versions.js:66:11
Error: Cannot find module 'angular'
Note that everything is clean on http://localhost:3000.
Already try a lot of solutions, as:
meteor add angular
meteor npm install --save angular
Disable minification of Js and Css.
This is the repository of this app deployed to heroku: https://github.com/dassiorleando/tasktor
his buildpack: https://github.com/dassiorleando/heroku-buildpack-meteor,
it is a buildpack with an updated Node Engine(4.5.0), that allowed to run an app with the meteor 1.4.X version.
Knowing that I add Angular-Material after finish this tutorial, because I wanted to have a clean material design style on my todo. You can check the repository to look about.
How can I handle this situation ?
Thanks in advance.
Doing this:
meteor add angular
Adds an old atmosphere angular-meteor package, which also refers to an old (1.2.27) version of angular. The best way to proceed is to remove this and just use angular npm packages. You will need these packages
pbastowski:angular-babel
urigo:static-templates
dotansimha:accounts-ui-angular
The last one is if you are using the accounts package.
The tutorial at https://www.angular-meteor.com/tutorials/socially/angular1/bootstrapping recommends this:
So let's remove it by running:
$ meteor remove blaze-html-templates
$ meteor remove ecmascript
Now let's add the Angular 1 package to Meteor, back in the command
line, launch this command:
$ meteor npm install --save angular angular-meteor babel-runtime
$ meteor add angular-templates pbastowski:angular-babel
That's it! Now we can use Angular 1's power in our Meteor app.

using goinstant with node.js in order to use webrtc

i try to implement a collaborative work plateforme based on node.js in back-end that ok
but i want to integrate webrtc and visoconferance it's possible and how to use goinstant in BAAS
gortc is published as a component.io component so you won't find it on npm. To build the webrtc widget simply run npm install then grunt build.
Alternatively, you can install an already built version via bower:
bower install goinstant-webrtc
or use a build hosted on GoInstant's CDN:
https://cdn.goinstant.net/widgets/webrtc/latest/webrtc.min.js
https://cdn.goinstant.net/widgets/webrtc/latest/webrtc.css
For the full webrtc-demo you get that error message if redis is not running/found. To start redis do: redis-server.

What are the benefits of installing Express.js locally vs globally

As I understand it, there are two ways to install Express.js.
Using npm install express - either from package.json or via command line. This method will install express locally in your node_modules folder.
Using npm install express -g . This method installs the package globally on your machine.
I was just wondering what the benefits were to using either method. Is either one considered "best practice" over the other?
For creating an app, you should always install it locally. This will allow you to use different express version for each app you make.
Installing express globally will allow you to use the express command line utility to create boilerplate code and stuff. So ideally, you should install express in both places, but make sure the app you develop run on the local version.

Resources