1
Prerequisites

Before you begin, make sure you have Node.js, MongoDB, XCode (for generarting iOS app) and/or the Android SDK (for generarting Android app) installed.

You'll need a reasonable working knowledge of Javascript to use LandmarkJS, as well as familiarity with basics such as database concepts, and using node / npm etc.

2
Commands

Install the CMS and app generators

You'll be using the LandmarkJS generator and Landmark Connect generator made with Yeoman. In your root directory run:

npm install -g generator-landmark
 
npm install -g generator-landmark-connect

Create a folder for your project

Create your project wherever you want:

mkdir my-test-project

Then make sure you're in your new project:

cd my-test-project

Create subfolders for LandmarkJS and Landmark Connect

mkdir my-project-cms
mkdir my-project-app

Run the generators

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.

3
You're Done!

So you just created your first Landmark project, congrats!

Run the CMS in your command line from your CMS folder like this:

node landmark

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.

View the CMS getting started guide →

Test the app in your browser by typing this in the app folder:

ionic serve

This will start a live-reload server for your project. When changes are made to any HTML, CSS, or JavaScript files, the browser will automatically reload when the files are saved.

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.

View the app getting started guide →

?
Problems

Something went wrong? Hopefully these tips will help.

ERR! Please try running this command again as root/Administrator.

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.

What do you mean it couldn't find my Database?

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:

MONGO_URI=mongodb://your-server/database-name

Something else?

If your issue still isn't resolved, reach out to us on the Landmark Project Google Group.