Hi everyone,
I’m trying to make a little accounts system on a glitch.me site but when testing & submitting a form to create one, nothing happens and console tells me Glitch don’t allow POST requests but only GET, OPTIONS & HEAD.
Why this? What can I do to solve this?
Sorry about that! Glitch static sites do not allow POST requests, probably because of how s3 works.
However , they do work on non-static sites:
2 Likes
May I know how to disable Static Site feature for my site?
You can upgrade your site to a node site by adding a package.json file:
1 Like
For example:
{
"//1": "describes your app and its dependencies",
"//2": "https://docs.npmjs.com/files/package.json",
"//3": "updating this file will download and update your packages",
"name": "hello-express",
"version": "0.0.1",
"description": "A simple Node app built on Express, instantly up and running.",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.17.1"
},
"engines": {
"node": "12.x"
},
"repository": {
"url": "https://glitch.com/edit/#!/hello-express"
},
"license": "MIT",
"keywords": [
"node",
"glitch",
"express"
]
}
1 Like
no_one:
You’ll also need to put your .html files in a src folder
Err… no? Do you mean views?
Oh okay
Thanks a lot for your help
1 Like