Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "react-redux-realworld-example-app"]
path = react-redux-realworld-example-app
url = https://github.com/cirosantilli/react-redux-realworld-example-app
20 changes: 20 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Node Express Mongoose Realworld Example App

....
cd react-redux-realworld-example-app
npm install
cd ..
npm install
....

To run development server, start `mongod` on the standard port 27017 and run:

....
npm run dev
....

This automatically opens a browser at http://localhost:4101/

The database name is `realworld_express`.

TODO deployment.
52 changes: 0 additions & 52 deletions README.md

This file was deleted.

2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (!isProduction) {
if(isProduction){
mongoose.connect(process.env.MONGODB_URI);
} else {
mongoose.connect('mongodb://localhost/conduit');
mongoose.connect('mongodb://localhost/realworld_express');
mongoose.set('debug', true);
}

Expand Down
4 changes: 2 additions & 2 deletions models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ UserSchema.methods.toProfileJSONFor = function(user){

UserSchema.methods.favorite = function(id){
if(this.favorites.indexOf(id) === -1){
this.favorites.push(id);
this.favorites = this.favorites.concat([id]);
}

return this.save();
Expand All @@ -79,7 +79,7 @@ UserSchema.methods.isFavorite = function(id){

UserSchema.methods.follow = function(id){
if(this.following.indexOf(id) === -1){
this.following.push(id);
this.following = this.following.concat([id]);
}

return this.save();
Expand Down
Loading