0

I have hosted my Parse-Server on DigitalOcean by following these tutorials
1. www.digitalocean.com/community/tutorials/how-to-migrate-a-parse-app-to-parse-server-on-ubuntu-14-04
2. www.digitalocean.com/community/tutorials/how-to-secure-nginx-on-ubuntu-14-04

Everything works nicely except that any file uploaded to parse-server has url like -

"https://domain_name.com:1337/parse/files/.....file_name.png"

How can I configure my parse-server to generate URL without port number (1337) from file URL?

Like this - "https://domain_name.com/parse/files/.....file_name.png"


I have set following parameters for parse-server

"PARSE_SERVER_URL": "https://domain_name.com/parse",
"PARSE_PUBLIC_SERVER_URL": "https://domain_name.com/parse",

Thanks!

user3805150
  • 3
  • 1
  • 4
  • if you actually config'd and started parse-server with the public URL u show... AND you go thru the fileAdapter in that server's instance in order to get the URL, THEN YOU SHOULD NOT see the port in the returned url. double check what config is actually being run, double check the dashboard is running against the DB instance where the files are actually being stored.... – Robert Rowntree Nov 29 '16 at 18:58

1 Answers1

0

Actually I am using pm2 for handling my Parse-Server. So when I updated my PARSE_SERVER_URL and PARSE_PUBLIC_SERVER_URL from one which included port number to one which did not included port number, and restarted my parse-server using

pm2 restart server_name

PM2 restarted some cached version of the server. Thus I could not see any changes in the URL generated by parse-server for files. But recently when I deleted and restarted the parse-server, I could see the correct URLs being generated.

Thanks @Robert Rowntree.

user3805150
  • 3
  • 1
  • 4