Skip to content
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

This PR provides a .env file and a note in the readme on how to connect to a mongo database. #30

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APOS_MONGODB_URI=mongodb://<user>:<pass>@localhost:27017/<db>?authSource=<auth_db>
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Install dependencies: `npm install`

Enter your MongoDB connection URI in `.env`

## Running the project

Run `npm run dev` to build the Apostrophe UI and start the site up. Remember, this is during alpha development, so we're all in "dev mode." The `dev` script will watch for saves in client-side CSS and Javascript and trigger a build and page refresh if they are detected. It will also restart the app when server-side code is saved.
Expand Down
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require('dotenv').config()

require('apostrophe')({
shortName: 'a3-boilerplate',
modules: {
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"start": "node app",
"dev": "nodemon",
"build": "NODE_ENV=production node app @apostrophecms/asset:build",
"serve": "NODE_ENV=production node app",
"build": "cross-env NODE_ENV=production node app @apostrophecms/asset:build",
"serve": "cross-env NODE_ENV=production node app",
"release": "npm install && npm run build && node app @apostrophecms/migration:migrate"
},
"nodemonConfig": {
Expand Down Expand Up @@ -38,7 +38,9 @@
"license": "MIT",
"dependencies": {
"apostrophe": "^3.0.0",
"normalize.css": "^8.0.1"
"normalize.css": "^8.0.1",
"cross-env": "^7.0.3",
"dotenv": "^10.0.0"
},
"devDependencies": {
"eslint": "^7.16.0",
Expand Down