mirror of
https://github.com/NotAShelf/catApi.git
synced 2024-11-26 08:46:45 +00:00
comment cleanup
This commit is contained in:
parent
73488b70e9
commit
ea9413d021
1 changed files with 4 additions and 8 deletions
12
index.js
12
index.js
|
@ -61,7 +61,8 @@ if(process.env.PORT) {
|
|||
}
|
||||
else {
|
||||
logger2
|
||||
.error('Custom URL not defined. Falling back to http://localhost:' + port)
|
||||
.error('Custom URL not defined. Falling back to localhost')
|
||||
.info('App listening at http://localhost:' + port)
|
||||
.comment('Godspeed, little fella!')
|
||||
const getRandomImageApi = () => {
|
||||
const path = getRandomImagePath();
|
||||
|
@ -99,7 +100,7 @@ else {
|
|||
app.listen(port, () => {
|
||||
if(process.env.CUSTOMURL) {
|
||||
logger2
|
||||
.success('Custom URL defined. Using custom url ' + customurl + '\n(Hope you have configured a reverse proxy.)')
|
||||
.success('Custom URL defined. Using custom url ' + customurl)
|
||||
.success('App listening at ' + 'https://' + customurl);
|
||||
console.log('Godspeed, little fella!');
|
||||
const getRandomImageApi = () => {
|
||||
|
@ -117,7 +118,7 @@ else {
|
|||
}
|
||||
else {
|
||||
logger2
|
||||
.error('Custom URL not defined. Falling back to http://localhost:' + port)
|
||||
.error('Custom URL not defined. Falling back to localhost')
|
||||
.info('App listening at ' + 'http://localhost:' + port)
|
||||
.comment('Godspeed, little fella!')
|
||||
const getRandomImageApi = () => {
|
||||
|
@ -137,11 +138,6 @@ else {
|
|||
});
|
||||
}
|
||||
|
||||
// Check if a custom port is set in .env
|
||||
// if it is, then check if a custom url is defined.
|
||||
// Makes sure API routes are configured correctly.
|
||||
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.sendFile(getRandomImagePath(), (err) => {
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in a new issue