Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 3.35 KB

File metadata and controls

83 lines (61 loc) · 3.35 KB

OnlineCodeEditor

Table of contents

List of packages

Package Description
compression Express 4 middleware.
codemirror Versatile text editor implemented in JavaScript for the browser.
express Sinatra inspired web development framework for node.js.
mongodb cross-platform document-oriented database
mongoose MongoDB ODM.
morgan
serve-favicon Express 4 middleware offering favicon serving and caching
moniker Random name generator
socket.io JavaScript library for realtime web applications
supertest HTTP assertion library.
chai BDD/TDD assertion library.
mocha Test framework.

Project structure

Name Description
config/index.js
config/development.json development settings
config/production.json production settings
config/test.json test settings

Prerequisites

Running the app

git clone --depth=1 https://github.com/AlexandruSimandi/OnlineCodeEditor.git someproject

# change the directory to the project one
cd someproject

# required for mongo-morgan
sudo apt-get install build-essential

# install node package manager dependecies
npm install

# install bower dependencies
bower install

# run the default gulp
gulp

# start the server
node server.js

In production you can use pm2 or forever (production process managers for Node.js applications)

# use this instead of server.js
pm2 start server.js

When you develop the app you can use nodemon, install it sudo npm install -g nodemon and then replace node server.js with nodemon server.js. Nodemon will watch for changes in the app and then automatically restarts the server.