The fastest way to create your Landmark project. For a deep dive, check out the docs.
npm install -g generator-landmark npm install -g generator-landmark-connect
Create your project wherever you want:
Then make sure you're in your new project:
mkdir my-project-cms mkdir my-project-app
Make sure you are in the CMS subfolder, then run the CMS generator:
cd my-project-cms yo landmark
Make sure you are in the app subfolder, then run the app generator:
cd my-project-app yo landmark-connect
Both generators will ask you a few questions about what features you'd like to include, then configure and copy all the files you'll need into your project.
It will also install dependencies from npm so you're ready to go.
So you just created your first Landmark project, congrats!
Run the CMS in your command line from your CMS folder like this:
Then open http://localhost:3000 to view it in your browser.
If you want to see what the generator actually did take a look at our getting started guide, it'll walk you through the manual setup process. This is particularly helpful if you're new to Node.js.
Test the app in your browser by typing this in the app folder:
If you want to see what the generator actually did take a look at our getting started guide, it'll walk you through some of the configuration of the app. This is particularly helpful if you're new.
Something went wrong? Hopefully these tips will help.
When running npm install -g generator-landmark, you may get an EACCES error asking you to run the command again as root/Administrator. This indicates that there is a permissions issue.
On your development system you can change directory ownership to the current $USER so you do not have to run sudo while installing untrusted code:
sudo chown -R $USER /usr/local # Other directories may be required depending on your O/S sudo chown -R $USER /usr/lib/node_modules/
For a production/shared environment you may wish to re-run the npm command with the sudo prefix:
sudo npm install -g generator-landmark
For more information, see the "What, no sudo?" of the Intro to npm by Isaac Schulueter.
By default, LandmarkJS will look for a MongoDB server running on localhost on the default port, and connect to it. If you're getting errors related to the MongoDB connection, make sure your MongoDB server is running.
If you haven't installed MongoDB yet, follow the instructions below.
To connect to a server other than localhost, add a MONGO_URI setting to the .env file in your Landmark project directory:
If your issue still isn't resolved, reach out to us on the Landmark Project Google Group.