Giter VIP home page Giter VIP logo

rankme's Introduction

rankMe

Progetto applicazioni e servizi web

Per server e client entrare nella rispettiva cartella, per lanciare entrambi entrare in /server Per lanciare il server:

#npm run server

Per il client:

#npm run client

Per entrambi:

#npm run dev

Per lanciare l'intero applicativo usando docker-compose:

Prima di compilare le immagini, assegnare nel file index.js "DOCKER_DB" come URI di connessione al db Mongo, altrimenti non funzionerà perchè il server non riuscirà a contattare correttamente il db.

docker-compose build docker-compose -f up -d

Questo comando lancierà tre container, client server e un database mongodb Tutti e tre condividono una rete, "interna" sulla quale il client comunica con il server e il server con il DB

Dockerfile client: #Tell docker to use this image, node, as base image FROM node:alpine

Set a envirnoment variable to use later

ENV WORKINGDIR=/app ENV PATH /app/node_modules/.bin:$PATH

#Set working directory as default for operations WORKDIR ${WORKINGDIR}

#Copy file with dependencies for npm install COPY package*.json ./

Install dependencies

RUN npm install --silent

#Bundle app source COPY . .

#Indicate port to expose to the extern EXPOSE 5000

#Set comand to launch at start CMD ["npm", "run", "start"]

rankme's People

Contributors

schiaro98 avatar lucarossi147 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.