npm install body-parser
const express = require('express');
const { v4: uuidv4 } = require('uuid');
const app = express();
const port = 3000;
const bodyParser = require('body-parser');
app.use(express.urlencoded({ extended: false }))
app.use(express.json());
app.use(bodyParser.json())
app.post('/api/text',(req, res) => {
console.log("---", req.body);
res.send("text");
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
req.on('end', () => {
console.log("---", body);
});
const express = require('express');
const { v4: uuidv4 } = require('uuid');
const app = express();
const port = 3000;
app.use(express.urlencoded({ extended: false }))
app.use(express.json());
app.post('/api/text',(req, res) => {
let body = '';
req.on('data', chunk => {
body += chunk.toString();
});
req.on('end', () => {
console.log("---", body);
});
res.send("text");
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
#pragma glslify: cnoise3 = require(glsl-noise/classic/3d.glsl)
uniform float time;
uniform vec3 colorStart;
uniform vec3 colorEnd;
uniform sampler2D textureOne;
varying vec2 vUv;
varying vec3 vNormal;
void main() {
vec4 textureOneLoad = vec4(1.0,1.0,1.0,0.1) - texture2D(textureOne,vUv);
gl_FragColor = textureOneLoad;
}