You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm gonna say some things. I know you've had no time and been super ambitious by the way so I know some things you'll have identified :) And your project is awesome :)
Pin the footer to the bottom
Contrast the writing so it's more readable
Styling on the form if you get time (I blame myself for our form styling)
Clean and very helpful README with great instructions (i'd put instructions on separate lines). Also amazing that you have dbbuild - mention it in the README and also to add the .env file. Badges on readme are great though.
Sometimes your commit messages can be more specific (I'm the biggest offender of this)
Super obscure :
Firstly amazing that you used node_env for running tests.
Secondly amazing that you did error handling
When I tried to run your tests.
I initially set DATABASE_URL and not TEST_DATABASE_URL.
When I ran npm test,
I got the error 'Environment variable DATABASE_URL must be set' (even though it had been set).
let CURRENT_DB = process.env.DATABASE_URL;
if (process.env.NODE_ENV === "test") {
CURRENT_DB = process.env.TEST_DATABASE_URL;
}
if (!CURRENT_DB)
throw new Error("Environment variable DATABASE_URL must be set");
> Error: Environment variable DATABASE_URL must be set
A quick fix below:
let CURRENT_DB;
if (process.env.NODE_ENV === "test") {
CURRENT_DB = process.env.TEST_DATABASE_URL;
if (!CURRENT_DB) throw new Error(`Environment variable TEST_DATABASE_URL must be set`);
}
else {
CURRENT_DB = process.env.DATABASE_URL;
if (!CURRENT_DB) throw new Error(`Environment variable DATABASE_URL must be set`);
}
Helper Functions
I'd like to see this in a nicely named helper func (edit: realise you already had this as an issue - woo!)
const name = req.url.split("=")[1];
const formattedName = name[0].toUpperCase() + name.slice(1);
e.g.
const formattedName = formatName(name);
The text was updated successfully, but these errors were encountered:
I'm gonna say some things. I know you've had no time and been super ambitious by the way so I know some things you'll have identified :) And your project is awesome :)
Super obscure :
Firstly amazing that you used node_env for running tests.
Secondly amazing that you did error handling
When I tried to run your tests.
I initially set DATABASE_URL and not TEST_DATABASE_URL.
When I ran npm test,
I got the error 'Environment variable DATABASE_URL must be set' (even though it had been set).
A quick fix below:
Helper Functions
I'd like to see this in a nicely named helper func (edit: realise you already had this as an issue - woo!)
The text was updated successfully, but these errors were encountered: