aswiratama / ShortenMe-1

Saas Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This directory contains one express servers:

  • Server.js + App.js - Encapsulated Node/Express web server w/ Mongo Access

File content:

  • Server.ts - based http server
  • App.ts - express server
  • DbClient.ts - mongo db client
  • DB population files are stored on the createDB file

Make sure you install the node.js server and Mongo DB sofware from the side. Ensure your path variable contains the execution path of the node.js and mongo binary.

To execute the server db and then the node server with the following commands:

//create the db file directory 0. md db

//Starts the DB server on port 3000

  1. mongod -port 3000 -dbpath ".\db"

//populate the DB server with sample data 2. mongo --port 3000 -u dbAdmin -p test --authenticationDatabase admin

load ('createDB/createShortenMeData.js'); exit

//Starts Node/Express server on port 8080 3. node Server.js

===============================OR using mLab:===================================== it's safe to check if new packages installed 0. npm install

run 1 ONLY for the very first time. For team ShortenMe, please SKIP this!!!

  1. mongo ds064799.mlab.com:64799/shortenme_db -u shortenme_admin -p su5240

load ('createDB/createShortenMeData.js'); exit

//Starts Node/Express server on port 8080 2. node Server.js

==================================================================================

To test server #3, try the following URL on the browser, while the server is running:

About

Saas Project


Languages

Language:JavaScript 56.3%Language:TypeScript 32.0%Language:HTML 11.5%Language:Batchfile 0.2%