Morfeo
Software of Development API REST with Nodejs, Express and MySQL
Install / Use
/learn @DanielArturoAlejoAlvarez/MorfeoREADME
MORFEO
Description
This repository is a API REST with Nodejs, Express and MySQL.
Installation
Using Nodejs v10.3, Express, MySQL preferably.
DataBase
Using MySQL preferably.
Apps
Using Postman or RestEasy to feed the api.
Usage
$ git clone https://github.com/DanielArturoAlejoAlvarez/Morfeo.git [NAME APP]
$ npm install
$ npm run dev
Follow the following steps and you're good to go! Important:

Coding
Routes
...
router.get('/api/users', UserCtrl.index)
router.get('/api/users/:id',UserCtrl.show)
router.post('/api/users', UserCtrl.create)
router.put('/api/users/:id', UserCtrl.edit)
router.delete('/api/users/:id', UserCtrl.destroy)
...
Controllers
...
function create(req,res){
const userData = {
iduser: null,
username: req.body.username,
email: req.body.email,
password: req.body.password,
created_at: null,
updated_at: null
}
User.saveUser(userData, (err,data)=>{
if(data && data.insertId){
res.status(200).json({
success: true,
msg: 'User saved!',
data: data
})
}else{
res.status(500).json({
success: false,
msg: 'ERROR'
})
}
})
}
...
Model
...
userModel.saveUser = (userData,callback)=>{
if(DB){
DB.query("INSERT INTO users SET ?", userData, (err,row)=>{
if(err){
throw err
}else{
callback(null, {
insertId: row.insertId
})
}
})
}
}
...
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/DanielArturoAlejoAlvarez/Morfeo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
