Skip to content

FrankYang0529/RMD-Letter-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RMD-Letter web

Node v6.10.0

Develop Environment Setup

MongoDB

macOS

brew install mongodb

Redis

macOS

brew install redis

nodemon

npm install nodemon -g

npm packages

npm install

DNS

Dnsmasq (macOS or Linux)

Reference

Install Dnsmasq

# Install it
brew install dnsmasq

# Create the etc dir if needed
mkdir -p /usr/local/etc

# Create a simple configuration
# This forces the .dev domain to respond with 127.0.0.1
# You can find more information in the default config file:
#   /usr/local/opt/dnsmasq/dnsmasq.conf.example
echo "address=/localhost/127.0.0.1" > /usr/local/etc/dnsmasq.conf

# Install the daemon startup file
sudo cp -fv /usr/local/opt/dnsmasq/*.plist \
  /Library/LaunchDaemons

# Start the daemon
sudo launchctl load \
  /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist

Configure macOS

# man 5 resolver
sudo mkdir -p /etc/resolver
sudo sh -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'

Dnsmasq to DNSAgent rules convert tool

DNSAgent (Windows)

DNSAgent Download

options.cfg:

{
    "HideOnStart": false,
    "ListenOn": "127.0.0.1:3000, [::1]",  //port 3000
    "DefaultNameServer": "119.29.29.29",
    "UseHttpQuery": false,
    "QueryTimeout": 4000,
    "CompressionMutation": false,
    "CacheResponse": true,
    "CacheAge": 86400,
    "NetworkWhitelist": null
}

rules.cfg:

[
    {
        "Pattern": "^(.*\\.)?localhost$",
        "Address": "127.0.0.1"
    }
]

Editor Setup

1 tab = 2 whitespace !!!

npm install eslint -g

Sublime

Install Packages

Start Server

MongoDB

sudo mongod

Redis

redis-server

Web Server

npm start

About

Recommend Letter Website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published