I have been trying to create a tutorial for github for FCC. But I need a lot of help for the purpose.
I am done with the skeleton of the page, but once the code is ready(Node+Passport+Express+Mlab + FrontEnd), how should I deploy it for campers to review and provide feedback? I mean, I could have gone with glitch but it cannot render something like :
<% if (user) { %>
Log out
<% } else { %>
Login
<% } %>
Glitch gives multiple errors while trying to render this.Can anyone please help me out if thereās any way I could proceed with deploying the code?
Glitch is not that different from heroku in uploading your codebase. A couple differences are that on glitch you donāt use a CLI on your local machine like you do with heroku, instead you just import the code using glitchās web interface directly from your linked github account, additionally your private api keys should be in .env file that is in the projectās main directory on glitch, whereas on heroku, i set the keys in the web dashboard using app>settings>Config Variables (you can also set it with the CLI)
@AdityaOli post your github repo here, and also post the errors glitch is giving you
@r1chard5mith What I am actually trying to do is to have two repos on userās github account, say ālocalā and āremoteā. Whatever is asked of the user to implement in the local repo, he/she also needs to merge it to the remote repo. That is why, to save sessions, repo information, progress etc, I thought using a db would be a great idea.
Ok, taking a look at it here in a few, just to verify , everything works as excepted locally on your machine right ? you are just having an issue when deploying it to glitch correct?
Ok I tried to link your project in github to glitch and you have several warnings re: bootstrap requiring you to also load jquery as it is a dependancy, but that is not what is causing you problems, the main error it is reporting is this,
/tmp/.__glitch__start.sh: line 1: null: command not found
the reason is because glitch needs a scripts start command in the package.json file similar to this format:
"scripts": {
"start": "node xyz"
}
where xyz is where your application should start, instead you are using nodemon in dev mode (understanble since you are developing locally, I use nodemon too)
so I changed this in your package.json file
"scripts": {
"dev": "nodemon server.js"
}
to this
"scripts": {
"start": "node server.js"
}
And it seems to take it BUT, now i get a different error
if (!options.clientID) { throw new TypeError('OAuth2Strategy requires a clientID option'); }
The reason is obvious, I donāt have your secret client id , so what I recommend is to do the above change yourself then throw in the client id in your .env file and see if it works.
FYI, under your profile in glitch click on āLogsā to see what the exact errors and warnings you are getting.
The left and right hand side are for the github repos ālocalā and āremoteā respectively Currently I am triyng to build a logic like if I have the directory structure like
so now I am trying to create a folder structure for the same. So there should be a parent folder hackerrank-sdk and on clicking that, all the files and folders should appear in that folder.
the console button in the footer opens the console where the commands taken as input will be tried.
The login button has been implemented using three-legged auth strategy. and it works fine now.