Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
1f97b3b
My identity for @lewagon in the gitconfig
AzCez Jul 8, 2019
e19cbd9
My identity for @lewagon in the gitconfig
AzCez Jul 24, 2019
dbabc70
My identity for @lewagon in the gitconfig
AzCez Jul 24, 2019
4729963
My identity for @lewagon in the gitconfig
AzCez Jul 24, 2019
0192c54
My identity for @lewagon in the gitconfig
AzCez Aug 10, 2019
67da903
My identity for @lewagon in the gitconfig
AzCez Sep 16, 2019
75e99f9
uncommented node_module for stt
Oct 25, 2019
7521823
turn on log
Oct 25, 2019
1913af2
My identity for @lewagon in the gitconfig
AzCez Nov 13, 2019
76ed50f
My identity for @lewagon in the gitconfig
AzCez Dec 27, 2019
cdbfd73
Update zshrc for Data Science bootcamp
AzCez Feb 18, 2020
e8925f1
disable python env
AzCez Feb 18, 2020
84f5009
python enable and alias recovered
AzCez Feb 18, 2020
4d3c67e
deactivated auto env 4 python, added alias to activate python env
AzCez Feb 18, 2020
3edf8a2
updates in dotfile
AzCez Mar 17, 2020
6f99d78
remove remote
AzCez Mar 23, 2020
52c6a2b
repo alias
AzCez Mar 24, 2020
7bc7efb
updates on alias
AzCez Mar 25, 2020
f1e757d
gor update by autofill current branch name
AzCez Mar 25, 2020
bfb60f4
generic commit either for test purpose or just lasy...
AzCez Mar 25, 2020
261fdfa
generic commit
AzCez Mar 25, 2020
c763790
generic commit either for test purpose or just lasy...
AzCez Mar 25, 2020
fe6b158
Merge branch 'master' into master
AzCez Mar 25, 2020
5cabe38
Merge branch 'master' of github.com:lewagon/dotfiles
AzCez Mar 25, 2020
5214da4
Merge branch 'master' of github.com:AzCez/dotfiles
AzCez Mar 25, 2020
fdaa6f8
ignore DS_store
AzCez Mar 25, 2020
6c47d8b
.DS_Store banished!
AzCez Mar 25, 2020
95257bc
updated alaises
AzCez Mar 31, 2020
7b8789a
open current file in terminal
AzCez Mar 31, 2020
b56ba9a
fix create repo by removing .git by default
AzCez Apr 5, 2020
2579b85
first commit on repo
AzCez Apr 5, 2020
69050a0
remove .git
AzCez Apr 5, 2020
884db16
view commit
AzCez Apr 6, 2020
7d922ba
added terminal to sublime
AzCez Apr 6, 2020
aa6f98e
go to Local to CODE folder
AzCez Apr 19, 2020
48fcb0f
zsh funtion test
AzCez Apr 19, 2020
465703b
git fetch
AzCez Apr 19, 2020
cd449fc
git status > git add . > git status
AzCez Apr 19, 2020
d979f86
Show alias file content in terminal
AzCez Apr 19, 2020
f17a13b
git status > git add . > git status
AzCez Apr 19, 2020
4ced361
#ZSH Interpolation
AzCez Apr 19, 2020
f1cf520
reply is: commit function
AzCez Apr 19, 2020
b6f36ae
function question() created with interpolation in zsh
AzCez Apr 19, 2020
7cb6701
test commit function iwth ga and gst
AzCez Apr 19, 2020
cb301ca
chevron print
AzCez Apr 19, 2020
7cdac6c
added space between lines
AzCez Apr 19, 2020
d0100e1
made it pretty
AzCez Apr 19, 2020
74bc172
Git commit with question prompt in terminal
AzCez Apr 19, 2020
4db7097
quote bewteen commit print
AzCez Apr 19, 2020
5881130
git fetch then pull
AzCez Apr 19, 2020
0a311b5
function git status then git add . then git status
AzCez Apr 19, 2020
a3cc7c7
improve gcom function
AzCez Apr 19, 2020
53e730b
Git add/status/commit/push with question prompt in terminal
AzCez Apr 19, 2020
615f4dc
fix gcomgor
AzCez Apr 19, 2020
13606f0
improve gcomgor with gts at end
AzCez Apr 19, 2020
025843e
modified ocde folder opening
AzCez Apr 19, 2020
1d78f88
eset git ignore
AzCez Apr 19, 2020
d218755
reset git ignore
AzCez Apr 19, 2020
cfc9e50
chamge gcomgor to cg
AzCez Apr 19, 2020
6e38bad
reset git ignore
AzCez Apr 19, 2020
c6caad3
reset git ignore
AzCez Apr 19, 2020
ff650be
reset git ignore
AzCez Apr 19, 2020
143698b
updated go root for trading bot
AzCez Apr 22, 2020
882cd09
upates alias for heroku
AzCez Aug 19, 2020
d9192a2
fix alias spacing
AzCez Aug 19, 2020
6b783c8
heroku logs
AzCez Aug 19, 2020
9eec6a6
fix heroku
AzCez Aug 19, 2020
3642cab
My identity for @lewagon in the gitconfig
AzCez Nov 9, 2022
cbcb6a7
added path for homebrew highlighting
AzCez Nov 9, 2022
49f71db
load rvm
AzCez Nov 10, 2022
8cd8a71
pending changes
AzCez Dec 17, 2023
002ad6b
My identity for @lewagon in the gitconfig
AzCez May 24, 2025
0d02d5c
Update dotfiles configuration
AzCez Jun 18, 2025
dbdddfa
Resolve merge conflicts in gitconfig and zshrc, keeping latest user a…
AzCez Jun 18, 2025
3a8ff51
clean up zshrc with gpt
AzCez Jun 18, 2025
3b7d1e9
move alias
AzCez Jun 18, 2025
8ab6882
dotfiles alias created
AzCez Jun 22, 2025
15010a4
feat: Add Rails + npm development workflow with process management, e…
AzCez Sep 11, 2025
0189c50
Merge upstream/master into rails-npm-alias to review PR #179
Sep 11, 2025
6c2dae3
chore(aliases): add Rails/Vite management aliases (krs, kvs, crs, rvs)
Sep 11, 2025
1efb0ed
docs: link to Rails + npm workflow (README-dev.md) from README
Sep 11, 2025
721edec
docs(aliases): note dev.sh workflow and link to README-dev.md
Sep 11, 2025
9fd0666
Merge pull request #1 from AzCez/rails-npm-alias
AzCez Sep 11, 2025
b76abcc
Add comprehensive development server management aliases
Sep 11, 2025
dc891e0
Merge pull request #2 from AzCez/rails_and_vite_servers
AzCez Sep 11, 2025
41d2657
feat(crs): show log tail commands for Rails and Vite
Sep 12, 2025
160eeac
kas.sh: also kill Sidekiq and Redis; update help text
Oct 5, 2025
f338dbb
crs.sh: add Redis/Sidekiq status, Docker status, and log tail command…
Oct 5, 2025
048ab4e
Aliases: add Rails+npm dev aliases; rename tdok→trdsdok; update crs.s…
Oct 5, 2025
867ee56
heroku deploy locally alias for aifactory
Oct 18, 2025
8100aa9
Merge pull request #3 from AzCez/rails_and_vite_servers
AzCez Oct 18, 2025
50124c4
feat(kas): kill API on port 8000 and align dev port sweep
AzCez Apr 4, 2026
ac4fe60
Update gitconfig: add git open alias, set user identity
AzCez Apr 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
9 changes: 9 additions & 0 deletions .macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#reload source ~/.zshrc


###############################################################################
# Finder #
###############################################################################

# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
182 changes: 182 additions & 0 deletions README-dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Rails + npm Development Setup

This setup provides a comprehensive development environment for Rails apps with React/Redux frontend using Webpacker.

## Files Created

- `dev.sh` - Main development script with process management
- Updated `aliases` - Shell aliases for quick access

## Installation

1. **Make the script executable** (already done):
```bash
chmod +x dev.sh
```

2. **Reload your shell configuration**:
```bash
source ~/.zshrc
# or if you source aliases separately:
source ~/path/to/aliases
```

3. **Configure your package.json** (if not already done):
```json
{
"scripts": {
"build": "webpack --mode production",
"watch": "webpack --watch --mode development",
"dev": "webpack-dev-server --mode development"
}
}
```

## Usage

### Basic Commands

```bash
# Start Rails server only
dev-rails

# Start npm watch only
dev-npm

# Start both Rails server and npm watch
dev-both

# Run npm build
dev-build

# Check status
dev-status

# Stop all processes
dev-stop
```

### Quick Shortcuts

```bash
dev # Start both (same as dev-both)
devs # Show status
devk # Kill all processes
```

### Enhanced Rails Server Aliases

```bash
s3dev # Rails server on port 3000 with process management
s4dev # Rails server on port 4000 with process management
s5dev # Rails server on port 5000 with process management
```

### Enhanced npm Aliases

```bash
npm-dev # Start npm watch
npm-build # Run npm build
npm-watch # Start npm watch
```

### Advanced Usage

```bash
# Start Rails on custom port
RAILS_PORT=4000 dev-rails

# Use custom npm script names
NPM_WATCH_SCRIPT=dev NPM_BUILD_SCRIPT=build-prod dev-npm

# Direct script usage
./dev.sh rails
./dev.sh both
./dev.sh status
```

## Features

### Process Management
- **PID tracking**: Each process is tracked with PID files
- **Graceful shutdown**: Processes are properly terminated on script exit
- **Status checking**: Verify if processes are actually running
- **Duplicate prevention**: Won't start multiple instances

### Error Handling
- **Dependency checking**: Verifies Rails and npm are installed
- **File validation**: Checks for `package.json` existence
- **Process validation**: Confirms processes started successfully
- **Exit codes**: Proper error codes for automation

### Logging
- **Separate log files**: Rails and npm logs are saved separately
- **Color-coded output**: Easy to distinguish different message types
- **Status messages**: Clear feedback on what's happening

### Environment Variables
- `RAILS_PORT` - Rails server port (default: 3000)
- `NPM_WATCH_SCRIPT` - npm watch script name (default: watch)
- `NPM_BUILD_SCRIPT` - npm build script name (default: build)

## Integration with Existing Aliases

This setup integrates seamlessly with your existing aliases:
- Your existing Rails server aliases (`s3`, `s4`, etc.) still work
- New development aliases provide enhanced process management
- All existing git and other aliases remain unchanged

## Troubleshooting

### Common Issues

1. **"Rails command not found"**
- Make sure Rails is installed: `gem install rails`

2. **"npm command not found"**
- Make sure Node.js is installed: `brew install node`

3. **"package.json not found"**
- Make sure you're in the correct directory (Rails project root)

4. **Process won't start**
- Check logs: `tail -f /tmp/rails.log` or `tail -f /tmp/npm.log`
- Kill existing processes: `dev-stop`

### Log Files

- Rails logs: `/tmp/rails.log`
- npm logs: `/tmp/npm.log`
- PID files: `/tmp/dev-scripts/`

## Examples

### Typical Development Workflow

```bash
# Start development environment
dev

# Check status
devs

# Stop everything when done
devk
```

### Custom Configuration

```bash
# Start Rails on port 4000 and npm with custom script
RAILS_PORT=4000 NPM_WATCH_SCRIPT=dev dev-both
```

### Integration with Existing Workflow

```bash
# Your existing aliases still work
s3 # rails s (port 3000)

# New enhanced aliases
s3dev # Rails with process management
```
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
This repository is used by [Le Wagon](https://www.lewagon.com) students.

Advanced setup: see Rails + npm workflow in [README-dev.md](README-dev.md).

## Toolset

- [oh-my-zsh](http://ohmyz.sh/)
- [Visual Studio Code](https://code.visualstudio.com/)
- [git](https://git-scm.com/)

Loading