Skip to content
Closed
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This project is currently in development! It will be announced when there is a (

If you don't care about being able to upload media files to S3 or Login with Github or Google, you can drop in the file exactly how it is. Or, if you don't want to do that, just ask me to send you mine. Refer to [this gist](https://gist.github.com/catarak/70c9301f0fd1ac2d6b58de03f61997e3) for creating an S3 bucket for testing, or if you don't want to do that, I can add you to one of my S3 buckets.

6. `$ npm run fetch-examples` - this downloads the example sketches into a user called 'p5'
6. `$ npm run fetch-examples` - this downloads the example sketches into a user with the details you defined for the example user in the `.env` file.
7. `$ npm start`
8. Navigate to [http://localhost:8000](http://localhost:8000) in your browser
9. Install the [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en).
Expand Down
2 changes: 1 addition & 1 deletion client/components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class Nav extends React.PureComponent {
</li> }
<li className="nav__dropdown-item">
<Link
to="/p5/sketches"
to={`/${process.env.EXAMPLE_USERNAME}/sketches`}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l know this works fine in the development env:) but l don't know if it works in the production env

onFocus={this.handleFocus.bind(this, 'file')}
onBlur={this.handleBlur}
onClick={this.setDropdown.bind(this, 'none')}
Expand Down
2 changes: 1 addition & 1 deletion server/examples-gg-latest.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ function createProjectsInP5user(newProjectList) {
eachSeries(newProjectList, (newProject, sketchCallback) => {
newProject.save((saveErr, savedProject) => {
if (saveErr) throw saveErr;
console.log(`Created a new project in p5 user: ${savedProject.name}`);
console.log(`Created a new project in ${process.env.EXAMPLE_USERNAME} user: ${savedProject.name}`);
sketchCallback();
});
});
Expand Down
2 changes: 1 addition & 1 deletion server/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function createProjectsInP5user(projectsInAllCategories) {

newProject.save((saveErr, savedProject) => {
if (saveErr) throw saveErr;
console.log(`Created a new project in p5 user: ${savedProject.name}`);
console.log(`Created a new project in ${process.env.EXAMPLE_USERNAME} user: ${savedProject.name}`);
projectCallback();
});
}, (categoryErr) => {
Expand Down
2 changes: 1 addition & 1 deletion server/views/404Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import User from '../models/user';
import Project from '../models/project';

export function get404Sketch(callback) {
User.findOne({ username: 'p5' }, (userErr, user) => { // Find p5 user
User.findOne({ username: process.env.EXAMPLE_USERNAME }, (userErr, user) => { // Find example user
if (userErr) {
throw userErr;
} else {
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ module.exports = {
NODE_ENV: JSON.stringify('development'),
S3_BUCKET: process.env.S3_BUCKET ? `"${process.env.S3_BUCKET}"` : undefined,
S3_BUCKET_URL_BASE: process.env.S3_BUCKET_URL_BASE ? `"${process.env.S3_BUCKET_URL_BASE}"` : undefined,
AWS_REGION: process.env.AWS_REGION ? `"${process.env.AWS_REGION}"` : undefined
AWS_REGION: process.env.AWS_REGION ? `"${process.env.AWS_REGION}"` : undefined,
EXAMPLE_USERNAME: process.env.EXAMPLE_USERNAME ? `"${process.env.EXAMPLE_USERNAME}"` : undefined
}
})
],
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ module.exports = {
NODE_ENV: JSON.stringify('production'),
S3_BUCKET: process.env.S3_BUCKET ? `"${process.env.S3_BUCKET}"` : undefined,
S3_BUCKET_URL_BASE: process.env.S3_BUCKET_URL_BASE ? `"${process.env.S3_BUCKET_URL_BASE}"` : undefined,
AWS_REGION: process.env.AWS_REGION ? `"${process.env.AWS_REGION}"` : undefined
AWS_REGION: process.env.AWS_REGION ? `"${process.env.AWS_REGION}"` : undefined,
EXAMPLE_USERNAME: process.env.EXAMPLE_USERNAME ? `"${process.env.EXAMPLE_USERNAME}"` : undefined
}
}),
new webpack.optimize.CommonsChunkPlugin({
Expand Down