Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialYazan Abbas
5,299 Pointsget quotes and get a single quote works just fine but when I want to post or edit a post I get 500 internal server error
I get a 500 status error after re-structuring my file and trying send a POST or PUT request on postman
1 Answer
Yazan Abbas
5,299 Pointsfixed the problem, altho the teacher recommended that we keep app.use(express.json()); in the app.js file but the solution was to insert it in the routes.js file as the following: const router = express.Router(); router.use(express.json());