Git Product home page Git Product logo

dont-crash-my-drone-api's Introduction

Don't Crash My Drone App

Before You Begin

Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS application:

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

$ npm install -g bower
  • Grunt - You're going to use the Grunt Task Runner to automate your development process. Make sure you've installed Node.js and npm first, then install grunt globally using npm:
$ npm install -g grunt-cli
  • Sass - You're going to use Sass to compile CSS during your grunt task. Make sure you have ruby installed, and then install Sass using gem install:
$ gem install sass
  • Gulp - (Optional) You may use Gulp for Live Reload, Linting, and SASS or LESS.
$ npm install gulp -g

Downloading MEAN.JS

There are several ways you can get the MEAN.JS boilerplate:

Cloning The GitHub Repository

The recommended way to get MEAN.js is to use git to directly clone the MEAN.JS repository:

$ git clone https://github.com/meanjs/mean.git meanjs

This will clone the latest version of the MEAN.JS repository to a meanjs folder.

Downloading The Repository Zip File

Another way to use the MEAN.JS boilerplate is to download a zip copy from the master branch on GitHub. You can also do this using wget command:

$ wget https://github.com/meanjs/mean/archive/master.zip -O meanjs.zip; unzip meanjs.zip; rm meanjs.zip

Don't forget to rename mean-master after your project name.

Yo Generator

Another way would be to use the Official Yo Generator, which generates a copy of the MEAN.JS 0.4.x boilerplate and supplies an application generator to ease your daily development cycles.

Quick Install

Once you've downloaded the boilerplate and installed all the prerequisites, you're just a few steps away from starting to develop your MEAN application.

The first thing you should do is install the Node.js dependencies. The boilerplate comes pre-bundled with a package.json file that contains the list of modules you need to start your application. To learn more about the modules installed visit the npm & Package.json section.

To install Node.js dependencies you're going to use npm again. In the application folder run this in the command-line:

$ npm install

This command does a few things:

  • First it will install the dependencies needed for the application to run.
  • If you're running in a development environment, it will then also install development dependencies needed for testing and running your application.
  • Finally, when the install process is over, npm will initiate a bower install command to install all the front-end modules needed for the application

Running Your Application

After the install process is over, you'll be able to run your application using Grunt, just run grunt default task:

$ grunt

Your application should run on port 3000 with the development environment configuration, so in your browser just go to http://localhost:3000

That's it! Your application should be running. To proceed with your development, check the other sections in this documentation. If you encounter any problems, try the Troubleshooting section.

  • explore config/env/development.js for development environment configuration options

Running in Production mode

To run your application with production environment configuration, execute grunt as follows:

$ grunt prod
  • explore config/env/production.js for production environment configuration options

Running with User Seed

To have default account(s) seeded at runtime:

In Development:

MONGO_SEED=true grunt

It will try to seed the users 'user' and 'admin'. If one of the user already exists, it will display an error message on the console. Just grab the passwords from the console.

In Production:

MONGO_SEED=true grunt prod

This will seed the admin user one time if the user does not already exist. You have to copy the password from the console and save it.

Running with TLS (SSL)

Application will start by default with secure configuration (SSL mode) turned on and listen on port 8443. To run your application in a secure manner you'll need to use OpenSSL and generate a set of self-signed certificates. Unix-based users can use the following command:

$ sh ./scripts/generate-ssl-certs.sh

Windows users can follow instructions found here. After you've generated the key and certificate, place them in the config/sslcerts folder.

Finally, execute grunt's prod task grunt prod

  • enable/disable SSL mode in production environment change the secure option in config/env/production.js

Testing Your Application

You can run the full test suite included with MEAN.JS with the test task:

$ grunt test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.