Comments (2)
I had the same error but then i setup db and worked.
I had a problem setting up postgresql db but i fixed it and managed to start the app.
My setup went like this:
Step 1. Create the Database
psql postgres
CREATE DATABASE notesapi;
CREATE ROLE notesadmin WITH LOGIN PASSWORD 'password';
ALTER ROLE notesadmin WITH SUPERUSER;
ALTER DATABASE notesapi OWNER TO notesadmin;
\q
All fine.
Step 2
psql -d postgres -U notesadmin; <--- here i got ' psql: FATAL: Peer authentication failed for user "notesadmin" ' in terminal.
After some quick research i found https://stackoverflow.com/questions/18664074/getting-error-peer-authentication-failed-for-user-postgres-when-trying-to-ge which explains why you can't connect with 'notesadmin' user.
I didn't want to change postgresconfig so i did some more research and found https://stackoverflow.com/questions/17443379/psql-fatal-peer-authentication-failed-for-user-dev/17443990 which led me to use
psql -U notesadmin -h 127.0.0.1 -d notesapi which worked
From here i did the following steps and app started
\c notesapi
DROP TABLE IF EXISTS notes;
CREATE TABLE notes (
id SERIAL PRIMARY KEY,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL,
title TEXT,
body TEXT
);
\q
Step 3. Run the seed script
Finally, run npm run seed to populate some data.
npm start
Hope this save someone's time.
from server-components-demo.
Did you setup the database? Could you share the whole error?
from server-components-demo.
Related Issues (20)
- Authentication ?
- What happens when deploying breaking changes?
- suggestion : Add Postgres Docker installation in README.md HOT 1
- Using react-fetch on client HOT 1
- Suggestion: new router HOT 4
- Could not find webpack build output HOT 7
- useServerResponse: Infinite render when deactivating cache HOT 1
- Suggestion: Stale While Revalidate cache management HOT 1
- Webpack 5 Support HOT 1
- Webpack isServer:true HOT 1
- Suggestion: renderReactTree performance improvement
- How does react decide to rerender search result? HOT 3
- React-native support HOT 2
- No Clientx.main.js after build HOT 1
- Element type is invalid
- SyntaxError: Cannot use import statement outside a module
- Support for esbuild
- Can't use destructuring assignment in server code
- Integrate SSR HOT 1
- Demo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server-components-demo.