-
Notifications
You must be signed in to change notification settings - Fork 0
SETUP MAC
Setup instructions for NEXUS Support System on macOS systems.
- macOS 10.14 (Mojave) or later
- Xcode Command Line Tools
- Homebrew (recommended)
- Administrator privileges
xcode-select --installAccept the license agreement when prompted.
Homebrew makes installing software on macOS much easier.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Verify installation:
brew --versionbrew install node
# Verify installation
node --version
npm --version# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Load NVM
source ~/.bashrc
# Or for zsh
source ~/.zshrc
# Install Node.js 18
nvm install 18
nvm use 18
nvm alias default 18
# Verify
node --version
npm --versionDownload from nodejs.org and run the installer.
# Tap MongoDB repository
brew tap mongodb/brew
# Install MongoDB Community
brew install mongodb-community
# Start MongoDB
brew services start mongodb-community
# Enable MongoDB to start on boot
brew services enable mongodb-community
# Verify status
brew services list# Install Docker Desktop for Mac
# Download from docker.com
# Run MongoDB container
docker run -d -p 27017:27017 --name mongodb mongo:6.0- Download MongoDB from mongodb.com
- Download macOS tgz archive
- Extract to
/usr/local - Create data directory:
sudo mkdir -p /data/db
sudo chown -R $(whoami) /data/db- Start MongoDB:
mongod --dbpath /data/dbmongo
> show dbs
> exitbrew install git
# Verify
git --versionGit is usually pre-installed on macOS. Check with git --version.
git clone <repository-url>
cd GitHHb-Supportb-Supportnpm installcp .env.example .envnano .env
# Or use VS Code
code .envAdd your configuration:
PORT=3000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/githhbb-support
JWT_SECRET=your-secure-secret-hereopenssl rand -hex 64Save and exit (Ctrl+X, then Y, then Enter for nano).
npm run devnpm start# Install PM2 globally
npm install -g pm2
# Start application
pm2 start server.js --name githhb-uupportb-support
# Configure to start on boot
pm2 startup
pm2 saveCreate a LaunchAgent plist file:
nano ~/Library/LaunchAgents/com.githhb-uupportb-support.plistAdd:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.nexus</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/path/to/nexus/server.js</string>
</array>
<key>WorkingDirectory</key>
<string>/path/to/nexus</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>NODE_ENV</key>
<string>production</string>
</dict>
</dict>
</plist>Load the LaunchAgent:
launchctl load ~/Library/LaunchAgents/com.nexus.plistOpen your browser: http://localhost:3000
If macOS firewall is enabled, you may need to allow Node.js:
- System Preferences → Security & Privacy → Firewall
- Click "Firewall Options"
- Add Node.js or allow incoming connections
If you encounter Gatekeeper issues:
# Allow application to run
xattr -cr /path/to/application# Fix permissions if needed
chmod -R 755 /path/to/nexusmacOS Catalina and later use zsh by default. Ensure your shell profile is configured:
# For zsh (default on modern macOS)
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# For bash
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profileManage MongoDB with Homebrew services:
# Start MongoDB
brew services start mongodb-community
# Stop MongoDB
brew services stop mongodb-community
# Restart MongoDB
brew services restart mongodb-community
# Check status
brew services listSolution:
# Add Homebrew to PATH
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcSolution:
# Check MongoDB status
brew services list
# Restart MongoDB
brew services restart mongodb-community
# Check logs
tail -f /usr/local/var/log/mongodb/mongo.log
# Fix permissions
sudo chown -R $(whoami) /usr/local/var/mongodbSolution:
# Find process using port 3000
lsof -i :3000
# Kill process
kill -9 <PID>Solution:
# Clear npm cache
npm cache clean --force
# Delete node_modules
rm -rf node_modules package-lock.json
# Install again
npm installSolution:
xcode-select --installSolution:
# Update Xcode command line tools
sudo xcode-select --reset
# Try Homebrew installation again
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Edit Homebrew MongoDB configuration:
nano /usr/local/etc/mongod.confAdd memory configuration:
storage:
wiredTiger:
engineConfig:
cacheSizeGB: 2Restart MongoDB:
brew services restart mongodb-communitypm2 monit- Open Activity Monitor
- Search for "node" or "mongod"
- Monitor CPU and memory usage
- Open Console app
- View system logs
- Filter for "node" or application name
After successful setup:
- Configure GitHub Integration
- Set up LaunchAgent
- Configure Monitoring
- Deploy to production with Deployment Guide
For macOS-specific issues:
- Check Homebrew services status
- Review Console app logs
- Check Activity Monitor
- Verify firewall settings
- Check Gatekeeper settings
For general issues, see Troubleshooting Guide.
Recommended terminal emulator with better features:
brew install --cask iterm2Recommended code editor:
brew install --cask visual-studio-codeMongoDB GUI client:
brew install --cask posticoOfficial MongoDB GUI:
brew install --cask mongodb-compass