# Ghost Custom Functions - Server

**URL:** <https://forum.ghost.org/t/ghost-custom-functions-server/3720>\
**Category:** Developer help\
**Created:** [October 24, 2018, 11:44am UTC](https://forum.ghost.org/t/ghost-custom-functions-server/3720 "2018-10-24T11:44:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SylarRuby](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/sylarruby/32/1704_2.png) [@SylarRuby](https://forum.ghost.org/u/SylarRuby)\
**Post date:** [October 24, 2018, 11:44am UTC](https://forum.ghost.org/t/ghost-custom-functions-server/3720/1 "2018-10-24T11:44:07Z")

</div>

I’m trying to understand how Ghost works, its data structure and without touching the core. I’ve looking at [the docs](https://docs.ghost.org/concepts/introduction/) to get an idea on how to go about what I want to achieve.

In `post.hbs`, in a `<script>` tag, I want to make an AJAX call (GET, POST or PUT) to a function that returns data or does something. I dont know where to place that function. Also that needs a url to get to. That function should not be a client; it should be the server. How to achieve this? Possible?

ie: From the client, I send an api key to the “server” that gets a Twitter data, then returns that information where I update the DOM.

---

<div class="post-metadata">

**Author:** ![SylarRuby](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/sylarruby/32/1704_2.png) [@SylarRuby](https://forum.ghost.org/u/SylarRuby)\
**Post date:** [October 24, 2018, 9:37pm UTC](https://forum.ghost.org/t/ghost-custom-functions-server/3720/2 "2018-10-24T21:37:15Z")

</div>

I’ve figured it out:

1: Create an app and register it  
2: In the app, register a route  
3: Give route permission

Ghost is awesome ✊🏽

---

<div class="post-metadata">

**Author:** ![pascalandy](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/pascalandy/32/444_2.png) [@pascalandy](https://forum.ghost.org/u/pascalandy)\
**Post date:** [October 25, 2018, 2:48am UTC](https://forum.ghost.org/t/ghost-custom-functions-server/3720/3 "2018-10-25T02:48:08Z")

</div>

What are you looking to build?

---

<div class="post-metadata">

**Author:** ![SylarRuby](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/sylarruby/32/1704_2.png) [@SylarRuby](https://forum.ghost.org/u/SylarRuby)\
**Post date:** [October 25, 2018, 6:18am UTC](https://forum.ghost.org/t/ghost-custom-functions-server/3720/4 "2018-10-25T06:18:33Z")

</div>

Hi. I’m relatively new to Ghost and nodejs so I’m toying around the Ghost application.

I’m building a firebase commenting system which currently works. Since Im still limited on how the Ghost App works, most of the files that make up the firebase commenting are not in the app directory. I use the app directory for server-related functions such as get Twitter details, sending mentions notifications etc.

I’ve registered a route `/twitter/:apitoken` then use axios to make a POST request. One issue I face is with express. I see no option to make the paths `caseSenitive: true`

My `:apitoken` param keeps lowercasing and I don’t want that. I’ll explore in greater detail later 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [November 8, 2018, 6:18am UTC](https://forum.ghost.org/t/ghost-custom-functions-server/3720/5 "2018-11-08T06:18:33Z")

</div>

Closed on November 8, 2018, 6:18am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
