Turbo360开发服务器

时间:2018-11-01 01:21:16

标签: javascript node.js

尝试从turbo api连接到本地devserver时遇到麻烦,它曾经正常工作,但是由于某些原因我无法连接到localserver路由,它说它正在监听3000端口我得到这个:

enter image description here

这时它可以正常工作,但是当我尝试使用类似localhost:3000 / api的路由时,它返回我“ Cannot GET / api”,它之前运行良好,现在我无法连接到任何路线,有人知道如何解决吗?

这是路由文件夹中的索引:

// Full Documentation - https://www.turbo360.co/docs
const turbo = require('turbo360')({site_id: process.env.TURBO_APP_ID})
const vertex = require('vertex360')({site_id: process.env.TURBO_APP_ID})
const router = vertex.router()

/*  This is the home route. It renders the index.mustache page from the views directory.
    Data is rendered using the Mustache templating engine. For more
    information, view here: https://mustache.github.io/#demo */
router.get('/', function(req, res){
    res.render('index', {text: 'This is the dynamic data. Open index.js from the routes directory to see.'})
})

/*  This route render json data */
router.get('/json', function(req, res){
    res.json({
        confirmation: 'success',
        app: process.env.TURBO_APP_ID,
        data: 'this is a sample json route.'
    })
})

/*  This route sends text back as plain text. */
router.get('/send', function(req, res){
    res.send('This is the Send Route')
})

/*  This route redirects requests to Turbo360. */
router.get('/redirect', function(req, res){
    res.redirect('https://www.turbo360.co/landing')
})


module.exports = router

编辑:此后,我尝试了一些操作,重新创建了turbo文件夹不起作用,再次删除和下载均不起作用,由于某种原因,它无法获取路线

0 个答案:

没有答案