I was able to install it by following the instructions from here: https://products.containerize.com/discussion-forum/nodebb
I already have node.js installed on my computer. I did not install redis or nginx.
I have a mac, so on Terminal, after I created a directory called "nodebb", I skipped the first few lines of the instructions, and just pointed to the directory I created, by using the "cd" command. I then created another directory called NodeBB inside the nodebb directory. You may skip creating two directories and just create a directory called "NodeBB". I pointed to this directory by using the cd command.
Then this line
"git clone -b v1.15.x https://github.com/NodeBB/NodeBB.git ."
was the key for me.
After I typed that, nodebb was cloned to the directory.
Then I ran "./nodebb setup".
I used mongo for the database.
When prompted, I pasted the connection string that I got from mongodb's site. I substituted "nodebb" for the database part in the string. (I set up mongodb (Cloud Atlas) beforehand). The instructions that come up on Terminal will tell you to call your database "nodebb".
After that step, the program ran automatically and installed the files. It asked me to put in the username and password for mongodb and it also asked me to choose a name for admin and password. You might have to wait a while as it pauses for a long time after "Confirm Password". I thought there was some problem and was tempted to abort the operation, as it was taking a long time, but it did come up with further instructions after a while.
I typed "./nodebb start" when the setup finished and then went to "localhost:4567", and this time, I was able to see a normal board, and could log in as admin.
I write this follow-up in case another mac user has trouble installing nodebb. In the end, setup was pretty straightforward and did not involve a lot of steps. My OS is High Sierra.
The instructions, including the ones for Linux, at the official nodebb site did not work for me.
adding and using library
-
using this as example:
<head>
<script src="jquery-1.12.0.min.js"></script>
</head>
To add any library to nodebb do I just paste in custom header?
Also where do I put the library file(s)?
What is path that need to be use for url to reference it? -
Does anyone know of any nodebb doc that describes how to do this?
Is adding a library to nodebb manually not recommended? -
I think you can use the cdn of jquery if you want.
-
@Nisthar yes can use cdn. right now trying to learn and understand how to add any library.
another example:
foundation site shows this in head
<link rel="stylesheet" href="css/foundation.css" />
and this before the closing body
<script src="js/foundation.min.js"></script>
that part I understand for standard html file by creating the css and js folder and including the files but I want to do that inside nodebb.
Where do I put the css and js file for any library so it can be referenced and use for nodebb?
Not sure if I'm giving right details. Hope that make sense
-
Hey @charles, unfortunately, there's not one solution that will work for every library.
Many libraries will work just by adding the
<script>
tag alone to yourCustom Header
section of the ACP. But some are picky about in what order they get loaded, some won't work at all (without some help), and some will need you to use a require() call to load them. If we knew the specific library/s, I think we could be of more help.As far as uploading the library, everything in the
/public
directory is exposed on the website root. So, you can generally put the library anywhere in there. -
Just saw you posted about foundation.
foundation should work by adding the <script> tag, but you'll also need to reload it whenever the page changes, like so:
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.0/foundation.min.js"></script> <script> $(window).on('action:ajaxify.end', function(){ $(document).foundation(); }); </script>
-
@yariplus said:
As far as uploading the library, everything in the
/public
directory is exposed on the website root. So, you can generally put the library anywhere in there.This is what I was looking for! Thanks!
As for loading a js file at the end right before the closing body, which file should I place the script tag?