Satcha Takam
Satcha Takam
KPCKevin Powell - Community
Created by Satcha Takam on 5/4/2024 in #ui-ux
Hi everyone, please can help me by commenting my first web page design
please tell me more and suggestions are welcome
9 replies
KPCKevin Powell - Community
Created by Satcha Takam on 5/4/2024 in #ui-ux
Hi everyone, please can help me by commenting my first web page design
No description
9 replies
KPCKevin Powell - Community
Created by Satcha Takam on 5/4/2024 in #ui-ux
Hi everyone, please can help me by commenting my first web page design
No description
9 replies
KPCKevin Powell - Community
Created by Dilliwala on 4/29/2024 in #back-end
Login Error
when the user first logged in you should store the token or what ever you using to confirm that a user has logged in either in cookies or local storage (ps: I prefere localStorage), you would also create a handler in a useEffect hook that would check for a token in your localStorage berfore the app renders like that the user will not login at every page refresh. I hope it helped you
7 replies
KPCKevin Powell - Community
Created by yogi on 4/11/2024 in #back-end
I cannot see the cookies using fetch in react but I can see the cookies in thunderclient
for a more clear and concise code I think you should use the axios library for the fetch operations along with try/catch syntax
6 replies
KPCKevin Powell - Community
Created by francis on 4/6/2024 in #back-end
npm json-server
hello this is an example code of a custom endpoint with json-server
import jsonServer from 'json-server'

const server = jsonServer.create()
const router = jsonServer.router('db.json')
const middlewares = jsonServer.defaults()

const validator = (request, response, next) => {
console.log()

const { content } = request.body

if (request.method === 'POST' && (!content || content.length < 5)) {
return response.status(400).json({
error: 'too short anecdote, must have length 5 or more'
})
} else {
next()
}
}

server.use(middlewares)
server.use(jsonServer.bodyParser)
server.use(validator)
server.use(router)

server.listen(3001, () => {
console.log('JSON Server is running')
})
import jsonServer from 'json-server'

const server = jsonServer.create()
const router = jsonServer.router('db.json')
const middlewares = jsonServer.defaults()

const validator = (request, response, next) => {
console.log()

const { content } = request.body

if (request.method === 'POST' && (!content || content.length < 5)) {
return response.status(400).json({
error: 'too short anecdote, must have length 5 or more'
})
} else {
next()
}
}

server.use(middlewares)
server.use(jsonServer.bodyParser)
server.use(validator)
server.use(router)

server.listen(3001, () => {
console.log('JSON Server is running')
})
2 replies
KPCKevin Powell - Community
Created by blahboybaz on 2/28/2024 in #ui-ux
My first landing page
great thank for your response 🙏
4 replies
KPCKevin Powell - Community
Created by theboyduddus on 2/29/2024 in #front-end
React beginner question
this is a great course to learn react: https://fullstackopen.com/en/
7 replies
KPCKevin Powell - Community
Created by blahboybaz on 2/28/2024 in #ui-ux
My first landing page
yoo bro can you give some tips on how to learn design ??
4 replies