Source code for my personal web development and design portfolio, located at https://www.flamov.com.
Uses Node, Express, Parcel, Pug, and MongoDB. Also uses Jest for testing. Deployed with CircleCI and Docker Compose (compose files can be found here).
See the next steps and technical roadmap of the project here.
Previously built with Laravel/Lumen, Vue, and MySQL.
- Clone the repository
- Ensure you are using Node version >= 14 (
nvm install 14
/nvm use 14
) - Install Node modules (
npm i
) - Either in the process or in a
.env
file in the root of the repository, pass in the following environment variables:
Key | Description | Required |
---|---|---|
NODE_ENV |
Environment name | False |
NODE_HOST_URL |
Base URL of the website (without trailing slash) | True |
NODE_MONGODB_URL |
MongoDB connection string | True |
NODE_MONGODB_USER |
MongoDB username | True |
NODE_MONGODB_PASS |
MongoDB username | True |
NODE_NEW_RELIC_LICENSE_KEY |
New Relic license key | True |
- For development, use
npm run watch
- For testing, use
npm run test
,npm run eslint
, andnpm run stylelint
- For deployment, use
npm run assets:build
and thennpm run start
Command | Description |
---|---|
npm run start |
Run the server |
npm run watch |
Watch the server and assets |
npm run server:watch |
Watch the server with nodemon and restart on changes |
npm run assets:build |
Build the frontend assets (CSS, JS, etc.) for production |
npm run assets:watch |
Watch the assets and rebuild on changes with hot-reloading |
npm run eslint |
Test JavaScript linting with ESLint |
npm run eslint:report |
Same as npm run eslint but generates a JUnit report |
npm run stylelint |
Test SCSS linting with stylelint |
npm run test |
Run unit and integration tests |
npm run test:report |
Same as npm run test but generates a JUnit report |
npm run test:coverage |
Same as npm run test:report but also generates a coverage report |