Git Product home page Git Product logo

spa_menv's Introduction

SPA_menv

Single page application (crud) with Node+Express+Vue+MongoDB+Docker

Getting Started

Prerequisites

  • node.js v10.15.3
  • npm v6.4.1
  • MongoDb v4.0.3

Install node and npm

brew install node

Dowloand project

git clone https://github.com/AndreiSukharev/SPA_menv.git spa_menv
cd spa_menv

Installation

Using Docker

Install docker compose

https://docs.docker.com/compose/install/

Build

In project directory:

docker-compose build

Run

docker-compose up

go to http://localhost:3222

Note

if your port 3222 is busy change only this line in file .env

PORT_MACHINE=3222

Or

For MacOs with Homebrew

Install and start mongodb

brew tap mongodb/brew
brew install [email protected]
brew services start [email protected]

Install dependencies

npm i

Note

If you don't use docker, change in file .env

MONGO_HOST=mongo

to

MONGO_HOST=localhost

Why? See explanations here:

https://stackoverflow.com/questions/51011552/mongodb-on-with-docker-failed-to-connect-to-server-localhost27017-on-first-c

Run

npm run serve

go to http://localhost:3222

if your port 3222 is busy change both of these lines in file .env

PORT_MACHINE=3222
PORT_DOCKER=3222

Test

API Swagger documentation

http://localhost:3222/api-docs

Acknowledgments

List of docker containers

docker container ls -a

List of docker images

docker images

Remove containers:

one container

docker stop CONTAINER

docker rm CONTAINER

all containers

docker stop $(docker ps -a -q)

docker rm $(docker ps -a -q)

Remove images:

one image

docker image rm IMAGE

all images

docker rmi $(docker images -a -q)

spa_menv's People

Contributors

adsukharev avatar

Watchers

 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.