contentful / contentful_express_tutorial Goto Github PK
View Code? Open in Web Editor NEWA Simple Express js application Built on top of Contentful
License: MIT License
A Simple Express js application Built on top of Contentful
License: MIT License
Playing around with Contentful and when I try to deploy to heroku, I get a 503 Application error. npm run production
seems to generate errors in the heroku logs, but not sure how to resolve it. Can run npm start
locally with no problem and can see the app at localhost:3000.
products.js - getProducts (line 17) error: {
"sys": {
"type": "Error",
"id": "InvalidQuery"
},
"message": "The query you sent was invalid. Probably a filter or ordering specification is not applicable to the type of a field.",
"details": {
"errors": [
{
"name": "unknownContentType",
"value": "DOESNOTEXIST"
}
]
},
"requestId": "cec85c2a-3411-417e-b3a8-8a9c6811a33b"
}
[email protected] dev C:\works\contentful-node
NODE_EN=development nodemon ./bin/www
'NODE_EN' is not recognized as an internal or external command,
operable program or batch file.
In line 7 and 14 of services/product.js the content type ID is set to '2PqfXUJwE8qSYKuM0U6w8M' instead of 'product'. This matches the default test space but in the express app demo, but once you change the auth token and space ID to your new example space using the Product Catalogue example space template, the app fails. The error also doesn't help at all. The Product Catalogue sample space uses 'product' for the content type ID, not '2PqfXUJwE8qSYKuM0U6w8M'. The express app demo requires this value to be 'product' but doesn't mention that the sample code has the wrong content type IDs. Same thing happens for categories.
The team behind Jade realized someone else had the rights to that name. They've since renamed the package during a major version update to Pug.
You can read their comments here about the project's renaming. I'd be happy to submit a PR upgrading this example application to the new package, if that would be helpful?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.