robert52 / mean-blueprints-cm

MEAN Blueprints - Contact manager application
0 stars 4 forks source link

Add README.md file #4

Open robert52 opened 8 years ago

robert52 commented 8 years ago

The README should contain basic info about how to clone and start the project.

markwilx commented 7 years ago

I recently picked up your book and really like your approach. I'm a very experienced C programmer but don't know and am determined to learn MEAN. I think your book will get me there.

I’ve got an issue. I’m not sure if it is mine or your’s. It’s probably related to the deprecation warnings, that I’ll start investigating. But I wanted to give you a start on that README file. Here’s what I’ve got for you. I’m sure it can be improved. I’ll put my issue in a separate thread.

For those wanting to get started, I suggest you start with the MEAN repository in GitHub instead of typing it in from the book.

You'll need to install MongoDB. I installed the MongoDB community edition for macOS. Installation information for MongoDB can be found here: https://docs.mongodb.com/manual/installation/

Once you have MongoDB installed, it needs to be running when you run the MEAN Blueprints examples. I installed MongoDB on macOS in /usr/local/mongodb (and added this to my $PATH variable). I setup my MongoDB repository in /var/mongodb. To run MongoDB with my specific settings, I opened a separate terminal window and use the following command in that separate terminal. $ mongod --dbpath /var/mongodb I then minimize the terminal window. When I'm done for the day, I go back to the window and shut down MongoDB by pressing CTRL-C. For testing, this works. For a deployed system, you’d do it different. The “d’ in mongod stands for “daemon” and it normally runs continuously as a background (daemon) process.

After downloading, decompressing, and un-archiving the MEAN Blueprints source code (mean-blueprints-cm) on your computer, run the following: $ cd mean-blueprints-cm-master $ npm install

When you get to the last section of the Contact Manager chapter (which is "Running the contact test") if you run this: $ mocha tests/integration/contacts.test.js Your error message will include this line: Error: Cannot find module '../fixtures/user' And you need to run the following: $ node seeds/user.fixture.js

Now when you run the command: $ mocha tests/integration/contacts.test.js You’ll find this line in your error message: Error: Cannot find module './environments/test'

Run the following commands to create the test version of environments. $ cd config/environments $ cp example.js test.js $ cd ../..

You’ll then get the output you expect in the MEAN Blueprints book when you run this command: $ mocha tests/integration/contacts.test.js

Now when you run this command: $ NODE_ENV=test node server.js You setup a server for the contact manager. You access the server application by using a browser to go to the following URL: http://localhost:3000

Unfortunately, this is where I get hung up. My page shows the black text “loading…” continuously on a yellow-orange background. I'll continue working on this problem and create a separate thread for it.

robert52 commented 7 years ago

hi @markwilx thanks for the effort, much appreciated. Probably the codebase is a little bit outdate. I've started to migrate some of the code, but there are a lot of chapters. And probably will do it only for the backend part. But as you pointed out, a simpler and a good Readme file would provider a good way to bootstrap the projects. I'll try and make some time to update the project.

Cheers, Robert.