-
Notifications
You must be signed in to change notification settings - Fork 55
Add pern stack to this project #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds comprehensive PERN stack support to enable users to quickly scaffold Postgres + Express + React + Node.js applications. The implementation includes complete template files for both JavaScript and TypeScript variants along with proper project setup and configuration.
- Added PERN as a selectable stack option in the interactive CLI prompt
- Created comprehensive templates for both JavaScript and TypeScript PERN stacks including client/server structure
- Updated template manager to handle PERN stack file copying with fallback to MERN client templates when needed
Reviewed Changes
Copilot reviewed 36 out of 47 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| index.js | Added PERN option to the stack selection prompt |
| utils/templateManager.js | Added PERN stack template copying logic with MERN fallback for client |
| utils/project.js | Added PERN-specific development server instructions and Postgres configuration notes |
| templates/pern/typescript/* | Complete TypeScript PERN stack templates including client and server configurations |
| templates/pern/javascript/* | Complete JavaScript PERN stack templates including client and server configurations |
| package.json | Added Node.js type definitions for improved development support |
Files not reviewed (1)
- templates/pern/javascript/client/package-lock.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| app.listen(port, () => console.log(`Server running without DB on port ${port}`)); | ||
| } else { | ||
| const client = new Client({ | ||
| user: env.process.env.PG_USER, |
Copilot
AI
Oct 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect variable reference - should be process.env.PG_USER instead of env.process.env.PG_USER.
| user: env.process.env.PG_USER, | |
| user: process.env.PG_USER, |
| import reactHooks from 'eslint-plugin-react-hooks' | ||
| import reactRefresh from 'eslint-plugin-react-refresh' | ||
| import tseslint from 'typescript-eslint' | ||
| import { globalIgnores } from 'eslint/config' |
Copilot
AI
Oct 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path 'eslint/config' is incorrect. The globalIgnores function should be imported from 'typescript-eslint' or defined locally.
| import { globalIgnores } from 'eslint/config' | |
| import { globalIgnores } from 'typescript-eslint' |
| import { defineConfig, globalIgnores } from 'eslint/config' | ||
|
|
||
| export default defineConfig([ | ||
| globalIgnores(['dist']), | ||
| { | ||
| files: ['**/*.{js,jsx}'], | ||
| extends: [ | ||
| js.configs.recommended, | ||
| reactHooks.configs['recommended-latest'], | ||
| reactRefresh.configs.vite, | ||
| ], | ||
| languageOptions: { | ||
| ecmaVersion: 2020, | ||
| globals: globals.browser, | ||
| parserOptions: { | ||
| ecmaVersion: 'latest', | ||
| ecmaFeatures: { jsx: true }, | ||
| sourceType: 'module', | ||
| }, | ||
| }, | ||
| rules: { | ||
| 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], | ||
| }, | ||
| }, | ||
| ]) |
Copilot
AI
Oct 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path 'eslint/config' is incorrect. ESLint does not export these functions from this path. Consider using the standard configuration approach without these imports.
| import { defineConfig, globalIgnores } from 'eslint/config' | |
| export default defineConfig([ | |
| globalIgnores(['dist']), | |
| { | |
| files: ['**/*.{js,jsx}'], | |
| extends: [ | |
| js.configs.recommended, | |
| reactHooks.configs['recommended-latest'], | |
| reactRefresh.configs.vite, | |
| ], | |
| languageOptions: { | |
| ecmaVersion: 2020, | |
| globals: globals.browser, | |
| parserOptions: { | |
| ecmaVersion: 'latest', | |
| ecmaFeatures: { jsx: true }, | |
| sourceType: 'module', | |
| }, | |
| }, | |
| rules: { | |
| 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], | |
| }, | |
| }, | |
| ]) | |
| export default { | |
| ignorePatterns: ['dist'], | |
| overrides: [ | |
| { | |
| files: ['**/*.{js,jsx}'], | |
| extends: [ | |
| js.configs.recommended, | |
| reactHooks.configs['recommended-latest'], | |
| reactRefresh.configs.vite, | |
| ], | |
| languageOptions: { | |
| ecmaVersion: 2020, | |
| globals: globals.browser, | |
| parserOptions: { | |
| ecmaVersion: 'latest', | |
| ecmaFeatures: { jsx: true }, | |
| sourceType: 'module', | |
| }, | |
| }, | |
| rules: { | |
| 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], | |
| }, | |
| }, | |
| ], | |
| }; |
This pull request adds initial support for the PERN stack (Postgres, Express, React, Node.js) to the project, including both JavaScript client and server templates. The changes introduce new template files, configuration, and scripts for quickly scaffolding a PERN application, and update the stack selection logic to include PERN as an option. Additionally, development dependencies are updated for improved Node.js type support.
PERN Stack Integration
index.js, enabling users to generate a Postgres + Express + React + Node.js project.src/App.jsx), and documentation. [[1]]Development Environment Improvements
package.jsonto include@types/nodeindevDependenciesfor improved Node.js type support during development.