Coder Social home page Coder Social logo

mmorpgserver's Introduction

MMORPGServer

Prerequisite

This application requires Mongo DB And NodeJS.

Setup

Once both the above prerequisites are install, all required node packages can be installed by navigating to the project root directory and running npm install

Running the server

within a new terminal running the command mongod will launch the mongodb if it's not running as a service.

Once mongodb is running.

Within a new terminal running npm start will launch the application.

This will start the code in the server.js file which will start a new webserver and a socket server, with the details in the config/config.development.json file.

Details

The main entry point for the application is server.js which will create an express rest api server and a websocket server, and set up the server ui.

Server.js

This is bootstraps the application and calles the configProvider to get the configuration details from the config folder.

Once it has the config details it will create a new instance of the UI and get the UI logging system.

Once this is done it will seed the database with default data.

and then start the rest server and socket server.

configProvider.js

Based on the env setup in the env.json a config file will be loaded e.g. if env is set to development the the settings from config.development.json will be loaded.

api directory

This directory contails all the rest api routes and the mongoose models.

gameManagment

This contails global classes to manage the game data.

seed

This contains all the seed data for the database, a file should exist for each table in the DB and contain a json array.

servers

This is the main access point for each of the sub servers (api, socket).

spec

This stores all the unit tests for the server currently they are all bracking.

UI

This creates the UI for the server appliction

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.