Giter Site home page Giter Site logo

mean-starter-template's Introduction

MEAN stack starter template

A repository containing a starter MongoDB, Express.js, Angular, and Node.js (MEAN) project for full-stack web development

Running the Docker containers

  1. Start by installing Docker if you have not already done so: https://docs.docker.com/get-docker/
    • NOTE for Windows users: I highly recommend that you enable the Windows Subsystem for Linux Version 2 (WSL2) in Windows, and install a default Linux distribution (like Ubuntu) prior to installing Docker. Docker will run much easier on all editions of Windows 10 if you perform this step first
  2. After installing Docker, start the necessary containers for the project by running the scripts/start_container script appropriate for your operating system
    • scripts/start_container for macOS and Linux
    • scripts/start_container.bat for Windows

Developing

  1. Once the Docker containers have started, attach to the development container by running the scripts/attach_container script appropriate for your operating system
    • scripts/attach_container for macOS and Linux
    • scripts/attach_container.bat for Windows
  2. Navigate to the /app/meantemplate directory. This will be where the source code of the project will be shared into the Docker container
  3. Run yarn install to install server dependencies.
  4. Run npm run start:server to start the development server.
    1. You can access the Express.js API via http://localhost:9000 on your local machine
  5. In a new terminal, run another instance of scripts/attach_container and run npm run start:client to run the development client application inside the /app/meantemplate directory.
    1. You can access the Angular application via http://localhost:8080 in a browser on your local machine

Build & development

Run gulp build for building and gulp buildcontrol:heroku to deploy to Heroku.

Testing

  • Running npm test:client will run the client unit tests.
  • Running npm test:server will run the server unit tests.
  • Running npm test:e2e will run the e2e tests using Protractor.

FAQ

If you see an error from Heroku saying "match is not defined", try running these commands from your dist directory:

  1. heroku config:set NODE_MODULES_CACHE=false
  2. git commit -am 'disable node_modules cache' --allow-empty
  3. git push heroku master
  4. heroku config:set NODE_MODULES_CACHE=true

If you see a message during yarn install saying "info There appears to be trouble with your network connection. Retrying...", followed by the error "ESOCKETTIMEDOUT", cancel the yarn install and try it again. If this does not help, try restarting Docker.

Acknowledgements

This project is based, in part, on the Yeoman Angular Full-Stack Generator

LICENSE

This software is licensed under the FreeBSD License

mean-starter-template's People

Contributors

daniel-pittman avatar

Watchers

James Cloos avatar  avatar

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.