Coder Social home page Coder Social logo

server-node's Introduction

Minimalist Nodejs server for mydraft application

see :

WARNING : This code is not a fork of "mydraftcc/ui" (https://mydraft.cc), the source code of "mydraftcc/ui" must be available at build time (https://github.com/mydraft-cc/ui). Once the code is retrieved, i apply patches to make the "mydraftcc/ui" application compatible with the nodejs API server, and (optional) remove the code related to "UserReport".

Installation

Legacy or Docker

Legacy

# Required
./patch.sh
# if you want to remove UserReport from the application :
#./patch.sh "optional"
cd server && ./start.sh
#You could set environment parameters in server/start.sh

Docker

To build image :

docker build --no-cache --force-rm -t mydraftcc-nodejs-server .

if you want to remove UserReport from the application, add --build-arg PATCHOPTIONS=optional :

docker build --build-arg PATCHOPTIONS=optional --no-cache --force-rm -t mydraftcc-nodejs-server .

File webpack.config.js-forlocaldeveloppementwithserver

Copy this file to "ui/config/webpack.config.js" for debug session. All API request will be sent to the localhost:4000 server... You need to apply "patch.sh" before debugging UI with the nodejs server.

git submodule update --init
cp webpack.config.js-forlocaldeveloppementwithserver ui/config/webpack.config.js
./patch.sh
cd ui && npm run start
## start your debugging session

To use the application

Once your server is started, just open your favorite Browser (firefox) and enter http://[server Ip address]:4000/

Swagger

API documentation could be reached at [your server]:/api-docs/ Very usefull to debug API server

Start the server, and call the page /api-docs, play with API

./start.sh
# Open browser, call http://localhost:4000/api-docs/

Security

As you can see, server is not protected by login/password, no TLS transport. You should use it as a personal service.
If you decide to expose it on internet, you must installed this service behind reverse proxy (haproxy, nginx) with TLS, and monitor volume space used...

enjoy+++ Damien

server-node's People

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.