Coder Social home page Coder Social logo

aydine / express-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 11 KB

A barebones express and mongodb API setup. Using Docker and TypeScript. Use this as a quick starting point for developing ExpressJS API's

Dockerfile 5.09% TypeScript 88.91% JavaScript 2.72% Shell 3.28%

express-demo's Introduction

IMPORTANT: Git changed the following files to CRLF line endings!!! You will have to change them back to LF in order for it to work!!!

warning: LF will be replaced by CRLF in mongodb/mongo-create-admin.js. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in mongodb/mongo-create-express.js. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in mongodb/run.sh.

Express Demo

Welcome to the git repository for the Express Demo project.

Overview

This repository contains the back-end (Express.js) and Database (MongoDB).

Prerequisites

  • git
  • docker
  • docker-compose

On Windows use docker toolbox it comes with docker and docker-compose

Optional

  • docker-machine (when using a Windows host)
  • visual studio code (the prefered IDE for this project)

Getting started

  1. Pull this repo

  2. Install Docker for Windows - If windows 7 use docker toolbox follow the steps below on Windows 10 just use normal Docker for windows and skip to step 3

    On windows create a docker-machine - this is needed to run the docker containers inside of. $ docker-machine create -d "virtualbox" express-machine

    Start the docker machine $ docker-machine start express-machine

    Run the command $ docker-machine env

    Copy the last line from the output of that last command and paste it into your shell, this will configure it properly

  3. Go into the express folder and run the following command to install all the required node packages $ npm ci

  4. Navigate to project directory

  5. Run the following command to start the docker instances (Express, mongodb) - The -d flag is optional, this will detach the console from the docker instance so you can keep using it: $ docker-compose up -d //if using the -d flag you can see the logging by doing $ docker-compose logs -f

  6. Visit the service in your favorite browser.

    • http://localhost:8080/api/todo For local development purposes the ports are published to the docker-daemon host machine as specified in docker-compose.override.yml.

express-demo's People

Contributors

aydine avatar

Watchers

James Cloos 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.